How to Configure BranchCache Distributed Cache Mode in Windows Server 2022

Posted on 18th June 2023

How to Configure BranchCache Distributed Cache Mode in Windows Server 2022

In Windows Server 2022, you can configure BranchCache in one of two modes: distributed cache mode or hosted cache mode. In distributed cache mode, each client caches content locally and then shares that content with other clients on the network. In hosted cache mode, a central server caches content and then serves that content to clients on the network.

BranchCache is a feature that was first introduced in Windows Server 2008 R2. It is designed to reduce network bandwidth consumption and improve content availability on Branchoffice networks.

When you enable BranchCache on a server, the server will function as a cache server for content that is downloaded from content servers on the Internet or on the local intranet.

Enabling BranchCache on a server is a two-step process. First, you must install the BranchCache feature on the server. Second, you must configure the server for BranchCache.

To install the BranchCache feature on a server, follow these steps:

1. Open the Server Manager console.

2. In the left pane, click the Manage menu, and then click Add Roles and Features.

3. On the Before you begin page, click Next.

4. On the Select installation type page, click Next.

5. On the Select destination server page, click Next.

6. On the Select server roles page, click Next.

7. On the Select features page, select the BranchCache check box, and then click Next.

8. On the Confirm installation selections page, click Install.

9. On the Results page, click Close.

After you install the BranchCache feature on a server, you must configure the server for BranchCache. To configure a server for BranchCache, follow these steps:

1. Open the Group Policy Management console.

2. In the left pane, expand the Forest node, and then expand the Domains node.

3. Select the domain in which you want to create the Group Policy object (GPO).

4. In the left pane, click the Group Policy Objects node.

5. In the right pane, click the Action menu, and then click Create a GPO in this domain, and link it here.

6. In the New GPO dialog box, type a name for the new GPO, and then click OK.

7. In the left pane, click the new GPO.

8. In the right pane, click the Edit menu.

9. In the Group Policy Management Editor window, expand the Computer Configuration node, expand the Policies node, expand the Administrative Templates node, expand the System node, and then click BranchCache.

10. In the right pane, double-click Turn on BranchCache.

11. In the Turn on BranchCache dialog box, click Enabled, and then click OK.

12. In the Group Policy Management Editor window, expand the Computer Configuration node, expand the Policies node, expand the Administrative Templates node, expand the Network node, and then click BranchCache.

13. In the right pane, double-click Configure BranchCache.

14. In the Configure BranchCache dialog box, click Enabled, and then select the Distributed Cache mode check box.

15. Click OK.

16. Close the Group Policy Management Editor window.

17. Close the Group Policy Management console.

Now that you have installed and configured BranchCache on a server, clients on the network will be able to cache content from content servers on the Internet or on the local intranet.

How to Configure BranchCache Distributed Cache Mode in Windows Server 2022

BranchCache is a feature of Windows Server that helps improve network performance by caching content at branch office locations. When BranchCache is enabled, content from a central location is cached on a local server at the branch office. This cached content can then be accessed by users at the branch office, reducing the amount of traffic that needs to be sent over the WAN link.

BranchCache can operate in two modes: hosted cache mode and distributed cache mode. In hosted cache mode, a dedicated server at the branch office is configured as the BranchCache server. This server stores the cached content and serves it to users at the branch office.

In distributed cache mode, any server at the branch office can act as the BranchCache server. Content is cached on each server that is configured as a BranchCache server, and each server shares its cached content with the other BranchCache servers at the branch office. This allows for better scalability and redundancy, as there is no single point of failure.

To configure BranchCache in distributed cache mode in Windows Server 2022, follow these steps:

1. On the central server, open the BranchCache console. This can be done by going to Start > Administrative Tools > BranchCache.

2. In the left pane, select the Distributed Cache Mode option.

3. In the right pane, click on the Configure button.

4. On the General tab, select the Enable BranchCache checkbox.

5. Select the Allow clients to share content with other clients on the local network checkbox.

6. Click on the OK button.

7. On the central server, open the Group Policy Management console. This can be done by going to Start > Administrative Tools > Group Policy Management.

8. In the left pane, expand the domain and then expand the Group Policy Objects folder.

9. Right-click on the Default Domain Policy object and select Edit.

10. In the Group Policy Management Editor window, expand the Computer Configuration > Policies > Administrative Templates > Network > BranchCache folder.

11. Double-click on the Turn on BranchCache policy setting.

12. Select the Enabled option and click on the OK button.

13. Close the Group Policy Management Editor window.

14. On the central server, open the DNS console. This can be done by going to Start > Administrative Tools > DNS.

15. In the left pane, expand the DNS server and then expand the Forward Lookup Zones folder.

16. Right-click on the zone where the BranchCache content will be cached and select New Alias (CNAME).

17. In the New Alias (CNAME) dialog box, enter the following information:

Alias name: Enter a name for the alias. This can be anything that you want.

Fully qualified domain name (FQDN) for target host: Enter the FQDN of the central server.

TTL (seconds): Enter the TTL for the alias. This is the time that the alias will be cached by DNS servers.

18. Click on the OK button.

19. On the central server, open the Certificate Authority console. This can be done by going to Start > Administrative Tools > Certification Authority.

20. In the left pane, expand the Certification Authority and then click on the Certificate Templates folder.

21. In the right pane, right-click on the Web Server template and select Duplicate Template.

22. In the Duplicate Template dialog box, select the Windows Server 2022 Certification Authority and click on the OK button.

23. In the Properties of New Template dialog box, enter the following information:

Validity Period: Enter the length of time that the certificate will be valid for.

Certificate Authority: Select the central server from the drop-down list.

Subject name: Enter the FQDN of the central server.

24. Click on the Request Handling tab and select the Allow private key to be exported checkbox.

25. Click on the Security tab and add the IIS_IUSRS group. Give this group the Read and Enroll permissions.

26. Click on the OK button.

27. On the central server, open the Internet Information Services (IIS) Manager console. This can be done by going to Start > Administrative Tools > Internet Information Services (IIS) Manager.

28. In the left pane, expand the server and click on the Sites folder.

29. In the right pane, select the Default Web Site and click on the Bindings link in the Actions pane.

30. In the Site Bindings dialog box, click on the Add button.

31. In the Add Site Binding dialog box, select https from the Type drop-down list and enter the following information:

IP Address: Enter the IP address of the central server.

Port: Enter 443.

SSL Certificate: Select the certificate that was created earlier.

32. Click on the OK button.

33. In the right pane, double-click on the BranchCache module.

34. In the BranchCache Module Settings dialog box, select the Enable BranchCache checkbox.

35. Click on the OK button.

36. On the client computers at the branch office, open the Group Policy Management console. This can be done by going to Start > Administrative Tools > Group Policy Management.

37. In the left pane, expand the domain and then expand the Group Policy Objects folder.

38. Right-click on the Default Domain Policy object and select Edit.

39. In the Group Policy Management Editor window, expand the Computer Configuration > Policies > Administrative Templates > Network > BranchCache folder.

40. Double-click on the Turn on BranchCache policy setting.

41. Select the Enabled option and click on the OK button.

42. Close the Group Policy Management Editor window.

43. On the client computers at the branch office, open the DNS console. This can be done by going to Start > Administrative Tools > DNS.

44. In the left pane, expand the DNS server and then expand the Forward Lookup Zones folder.

45. Right-click on the zone where the BranchCache content will be cached and select New Alias (CNAME).

46. In the New Alias (CNAME) dialog box, enter the following information:

Alias name: Enter a name for the alias. This can be anything that you want.

Fully qualified domain name (FQDN) for target host: Enter the FQDN of the central server.

TTL (seconds): Enter the TTL for the alias. This is the time that the alias will be cached by DNS servers.

47. Click on the OK button.

48. On the client computers at the branch office, open the Internet Explorer and enter the URL of the content that will be cached. This can be done by going to Start > Internet Explorer.

49. When prompted, enter the username and password of a user account that has access to the content.

50. The content will now be cached on the client computer.