Fear and Loathing: More Windows 7 BranchCache Stuff - Part Deuce

In my last post, I started down the path of explaining how to setup and configure BranchCache in Distributed Cache mode. In this posting, I will finish up explaining how to configure Distributed Cache mode, and then talk how you test, verify, and troubleshoot the configuration if need be.

Client-Side Configuration

Like the server side configuration, you need to enable the BranchCache feature on your Windows 7 clients. To enable this feature in Distributed Cache mode there are two methods. The first method is via netsh. For example, Run Command Prompt (Run as Administrator) and execute:

netsh branchcache set service mode=DISTRIBUTED

Note:

By executing this command, you not only turn on and configure BranchCache, but you also configure Windows Firewall with the appropriate rules to allow BranchCache to operate in this mode.

Needless to say, running a netsh command is not the most efficient way of turning on BranchCache. That is why most people will use the second method for configuring BranchCache on your clients, which is GPO. To do this:

  1. Enable the Turn on BranchCache GPO setting (Computer Configuration\Policies\Administrative Templates\Network\BranchCache).
  2. Enable the Turn on BranchCache – Distributed Caching mode GPO setting (Computer Configuration\Policies\Administrative Templates\Network\BranchCache).
  3.  Enable and configure the BranchCache for network files GPO setting (Computer Configuration\Policies\Administrative Templates\Network\BranchCache). Here you must specify a latency value that determines when the network files aspect of BranchCache will should kick-in.

Note:

The latency value can be set to 0, which will force BranchCache for network files (SMB) to be turned on all the time. However, this kind of defeats the purpose. :>) Also, when you configure BranchCache via GPO, it will override any configuration that is done via netsh.

Once you have finished configuring your BranchCache GPO settings, you will also need to configure Windows Firewall to allow incoming HTTP and WS-Discovery traffic:

  • Allow TCP HTTP - 80 Inbound (from all other BranchCache clients – at the Branch Office).
  • Allow UDP WS-Discovery - 3702 Inbound (from all other BranchCache clients – at the Branch Office).

Hmmmmm…. What is this WS-Discovery thing… Well, WS-Discovery (Web Services Dynamic Discovery -WSD) is a technical specification for a multicast discovery protocol that is used to locate services on a local network. WSD, is not proprietary to Microsoft, and they use WSD within the BranchCache to discover locally cached content.  For example, BranchCache clients will initiate multicast WSD Probe messages with the hashes of the content probes to other BranchCache clients (also known as peers). If these peers have the content, they will then reply with unicast Probe-Match message.

To understand how this all works, here is the basic flow:

  1. Client2, will first contact the content server FileServer1 for a document named File.doc.
  2. FileServer1 will respond with list of hashes that make up the indices of the requested content.
  3. Client2, will then send out a WSD Probe message to other clients in their local network.
  4. If there is a match on another peer, then it responds to the Probe message with a Probe-Match.
  5. Client2, then will deiced on where to get the content from (content server or other peers).

Note:

If content is retrieved from other peers, this is done via HTTP.

Testing Distributed Cache Mode

To test BranchCache in Distributed Cache mode, you first need the following in place:

  1. Windows Server 2008 R2 based content server and content to put on that server (I recommend big files for fun).
  2. Two different network segments with some sort of latency.
  3. Two or more Windows 7 clients across the pond from the content server.

Then, once you have all of your chess pieces in place and have correctly configured BranchCache. The next step is to actually test BranchCache by performing the following steps:

  1. On Client1, copy a file from the share on the content server to your desktop.
  2. Next, on Client2, copy the same file from the share on the content server to your desktop.

Note:

These steps assume that you have setup BranchCache for network files.

Ok, are you scratching your head? Well, that is the point. After all, the only noticeable difference for a user should be an increase in performance when they access content for the first time. To actually see if things are working, you would need to fire up Perfmon. But, it’s late so let’s talk about that in my next post.

If you like this, check out some other posts from Tyson:

Or if you want, you can also check out some of Tyson's latest publications:

Lastly, visit the Microsoft Subnet for more news, blogs, and opinions from around the Internet. Or, sign up for the bi-weekly Microsoft newsletter. (Click on News/Microsoft News Alert)

Join the Network World communities on Facebook and LinkedIn to comment on topics that are top of mind.
Related:

Copyright © 2009 IDG Communications, Inc.

SD-WAN buyers guide: Key questions to ask vendors (and yourself)