Branchcache Server 2012, Part 2

By | May 15, 2014

Configure the Hosted Cache server

The next step is to configure the host cache server, though you can implement Branchcache without this. In hosted cache mode we store the cache on a designated server in the branch office and clients can pick up cached content from here. On the server located in the branch office , just start-up Powershell and run

Install-WindowsFeature BranchCache -IncludeManagementTools

Once the feature is installed you configure the server, still from Powershell with

Enable-BCHostedServer (For servers who’s not domain joined)

or

Enable-BCHostedServer -RegisterSCP (For domain joined, enables automatic discovery from BC-clients)

To confirm the configuration you run

Get-BCStatus

You should see the status something like this

BrancheCache

and further down

BrancheCacheComfirm2

Configure the clients

As for the clients things are simply configured in Group Policy

First we go to “Computer Configuration, Policies, Administrative Templates, Network, BranchCache” and set the following settings

BrancheCacheGPO1

Setting both the Distributed cache mode and the automatic hosted cache discovery makes the client search AD for a hosted cache server. If it finds a local server then it operates in hosted cache mode, and if not then the clients switch over to distributed mode.

Next we need the firewall configured. In the GPO we navigate to “Computer Configuration, Policies, Windows Settings, Security Settings, Windows Firewall with Advanced Security”

  1. Create a new inbound rule, select “predefined” and “BranchCache – Content Retrieval (Uses HTTP)“, next twice and then “Allow the connection” and click Finish
  2. Create a new inbound rule, select “predefined” and “BranchCache – Peer Discovery (Uses WSD)“, next twice and then “Allow the connection” and click Finish
  3. In outbound rules, create the exact same 2 rules as you just did for inbound.

After the GPO is done and linked to the correct OU you can turn to your clients and run

gpupdate /force

Then the Brachcache service must be restarted, so run from Powershell

Restart-Service PeerDistSvc

And to check the status it’s

Get-BCStatus

Notice that the client has detected a hosted cache server and is then set itself to use it.

BrancheCacheRun

So from now on the data from the file share on the content server will be cached on the hosted cache server whenever a client in the branch office access it.

Does it work?

In order to verify this I have performed the following test:

  1. On the hosted cache server, start performance monitor and load all Branchcache counters
  2. From one client copy a file from the file share on the content server to the local hard drive
  3. From another client copy the same file to its local hard drive
  4. Check the Branchcache counters on the hosted cache server that Branchcache works.

And after these steps I had the following result i Performance Monitor

BrancheCachedemo

“SMB:Bytes from server” is from the first copy operation where the data is copied from the content server and then cached on this server. “SMB:Bytes from cache” is the second copy operation where the clients get all the data from the cache on the hosted cache server instead of from the content server which is located in another site.

Finally, if you want to read more about deploying Branchcache I recommend you read the Branchcache Deployment Guide from Microsoft. It can be downloaded here: http://www.microsoft.com/en-us/download/details.aspx?id=30418