Simplify Windows WAN Optimization With BranchCache

Enterprise Networking Planet content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

If your company has at least two sites, with the file server over at a remote site, have you ever thought about how to ensure users have access to their files in the shortest amount of time? If you are a seasoned IT administrator, you might be considering a brand new file server with distributed file server technologies (Distributed File Systems or DFS). But is there any better solution out there? BranchCache, available through Windows Server 2008 R2, is one possible answer.

With tight integration between its latest server and client software, Microsoft has made new enterprise-class features possible. This week, starting with BranchCache, I’ll start off a series that introduces four features that can increase your company’s business efficiency by using Windows Server 2008 R2 and Windows 7.

What is BranchCache?

BranchCache allows remote files to be cached on the local network, either on a Windows Server 2008 R2 server or Windows 7 clients. This allows faster access to files that have been accessed by users from the same location. It’s a simple trick that can save lots of bandwidth, as this scenario demonstrates:

When a user (let’s call him “Nick”) wants to retrieve a file which is not available on the local file server/network, Nick’s PC will need to download the file from the remote server through the WAN. Depending on file size and network connectivity, the download could take a few minutes or a few hours.

An extension to the above scenario: Let’s assume that Nick and his colleagues will need to open the same file every morning. Without BranchCache, Nick and his colleagues’ computers will download the same file individually, slowing WAN connectivity for everybody.

With BranchCache, once the file has been downloaded the local network’s server or Nick’s Windows 7 computer will cache it. For subsequent users who attempt to open the file from the remote server, their Windows 7 computers will automatically fetch the copy from the local network’s server or Nick’s Windows 7 computer.

How does BranchCache work?

BranchCache works in two modes: Hosted Cache, and Distributed Cache.

Hosted Cache

Similar to having file servers in the branch office, Hosted Cache allows files to be cached in any servers, as long as the servers are running Windows Server 2008 R2 configured with BranchCache. These servers do not necessary need to have File Services role installed for BranchCache to work. The servers at the branch office could be a web server, or a Read-Only Domain Controller for BranchCache to work. This will tremendously lower the cost when setting up small branches, as a dedicated file server is no longer needed.

Distributed Cache

Distributed Cache allows Windows client computers to cache the files which have been downloaded from the remote server, and allowing other local users to download from the Windows client computers cached files.

Distributed Cache mode relies on Windows 7 computers in the branch office to work. To use Distributed Cache mode, all participating computers in the branch must use either Windows 7 Enterprise or Ultimate (No, Windows 7 Professional will not work).

Microsoft recommends you use Distributed Cache only if your branch office has less than 50 Windows 7 client computers. Due to the architecture of Distributed Cache, the network will not be as efficient if more than 50 Windows 7 client computers are in use at the same time.

Setting Up BranchCache

Without getting too detailed, here’s a quick overview of how to set up BranchCache:

BranchCache Requirements

For BranchCache to work, we need the following: two office locations or sites and at least 1 Windows Server 2008 R2 at each site.

Setting up the Main Site (HQ)

The server at the main site could have a file server or an application server installed, either of which can have the files or data to be shared to remote users. Application servers include Web (IIS), Windows Server Update Services, or System Center Configuration Manager branch distribution site system servers.

The steps to setup the server at the main site are fairly simple:

1. BranchCache for File Server:

  1. Install File Services role and BranchCache for Network Files role services.
  2. Enable Hash Publication

    • Non-domain file server: Use Group Policy to set: Computer Configuration, Administrative Templates, Network, Lanman Server, Hash Publication for BranchCache. See Figure 1. Options include:

      • Allow hash publication for all shared folders
      • Allow hash publication only for shared folders on which BranchCache is enabled
      • Disallow hash publication for all shared folders

  3. Domain file server: Have all file servers placed in the same Organization Unit (OU), and configure a Group Policy object for the OU. The settings are the same as above.
  4. Enable BranchCache on the file share individually. See Figure 2.

Figure 1: Enabling BranchCache in Group Policy.

Figure 2: Enabling BranchCache for share folder.

2. BranchCache for application server:

  1. Install and enable BranchCache from Server Manager. Note that BranchCache here is not the same as BranchCache for Network Files under

    BranchCache for File Server.

    See Figure 3.
  2. Start the BranchCache service.
  3. As long as the files are stored in the local server, and opened by compatible computers, (Windows Server 2008 R2 or Windows 7 Enterprise/Ultimate) with BranchCache enabled, caching will be used.

On both file server and application server:

  1. Install Certificate Authority and IIS.
  2. Configure server certificate auto-enrollment, and push the certificate to all file server/application servers.

Figure 3: Installing BranchCache.

3. Setting up the branch office

As explained earlier, we have Hosted Cache and Distributed Cache mode. Though we’ll provide a brief list of setup steps here, you should definitely follow the links in the Additional Resources list, below, for more detailed instructions.

Hosted Cache

  1. Use Group Policy to configure the setting of: Computer Configuration, Administrative Templates, Network, BranchCache,

    Turn On BranchCache


    Set BranchCache Hosted Cache mode
    . See Figure 4.
  2. Obtain and link the hosted cache server certificate to BranchCache.

Distributed Cache

  1. Use Group Policy to configure the setting of: Computer Configuration, Administrative Templates, Network, BranchCache, Turn On BranchCache and Set BranchCache Distributed Cache mode.

Figure 4: BranchCache settings in Group Policy.


BranchCache will help organizations with multi-site setups, whether they have just a few or millions of files to be shared across sites. By lowering the WAN usage, users will be able to use the Internet connectivity without slowdowns, which will also translate to high user work productivity.

Have you deployed BranchCache? How has it worked out for you? Drop me a comment on the good or the ugly of BranchCache.

Additional Resources

Get the Free Newsletter!

Subscribe to Daily Tech Insider for top news, trends, and analysis.

Latest Articles

Follow Us On Social Media

Explore More