BranchCacheHCM SXS
BranchCacheHCM SXS
BranchCacheHCM SXS
Step Guide
Microsoft Corporation
Published: May, 2010
Author: James McIllece
Editor: Scott Somohano
Abstract
BranchCache is a wide area network (WAN) bandwidth optimization technology that is included in
some editions of the Windows Server 2008 R2 and Windows 7 operating systems. To optimize
WAN bandwidth, BranchCache copies content from your main office content servers and caches
the content at branch office locations, allowing client computers at branch offices to access the
content locally rather than over the WAN.
This step by step guide provides instructions on how to deploy BranchCache in hosted cache
mode in a test network environment.
The information contained in this document represents the current view of Microsoft Corporation
on the issues discussed as of the date of publication. Because Microsoft must respond to
changing market conditions, it should not be interpreted to be a commitment on the part of
Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the
date of publication.
This White Paper is for informational purposes only. MICROSOFT MAKES NO WARRANTIES,
EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS DOCUMENT.
Complying with all applicable copyright laws is the responsibility of the user.
Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual
property rights covering subject matter in this document. Except as expressly provided in any
written license agreement from Microsoft, the furnishing of this document does not give you any
license to these patents, trademarks, copyrights, or other intellectual property.
Unless otherwise noted, the example companies, organizations, products, domain names, e-mail
addresses, logos, people, places, and events depicted herein are fictitious, and no association
with any real company, organization, product, domain name, e-mail address, logo, person, place,
or event is intended or should be inferred.
Your right to copy this documentation is limited by copyright law and the terms of the software
license agreement. As the software licensee, you may make a reasonable number of copies or
printouts for your own use. Making unauthorized copies, adaptations, compilations, or derivative
works for commercial distribution is prohibited and constitutes a punishable violation of the law.
2010 Microsoft Corporation. All rights reserved.
Microsoft, Active Directory, Windows, Windows NT, and Windows Server are either registered
trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.
All other trademarks are property of their respective owners.
Contents
BranchCache Step-by-Step Guide: Demonstrate Hosted Cache Mode in a Test Lab.....................5
Test Lab Scenario Overview........................................................................................................ 5
Requirements for BranchCache............................................................................................... 6
Steps for Demonstrating BranchCache Hosted Cache Mode.........................................................7
Perform basic configuration of all computers..................................................................................7
Rename the computer.................................................................................................................... 8
Configure a static IP address.......................................................................................................... 9
Install and configure the BranchCache content file server............................................................11
Install the WINS feature................................................................................................................ 11
Install the File Services server role............................................................................................... 12
Create a test share and add sample content................................................................................14
Configure hash publication for BranchCache................................................................................20
Manually generate content information.........................................................................................20
Install and configure the hosted cache server...............................................................................21
Install the BranchCache feature and set the service mode...........................................................21
Configure Windows Performance Monitor on Hosted-01..............................................................23
Create and deploy a certificate..................................................................................................... 24
Install the Web Server (IIS) server role......................................................................................... 25
Create and export a self-signed certificate....................................................................................27
Import the BranchCache certificate on client computers...............................................................36
Link the certificate to BranchCache..............................................................................................40
Configure client computers........................................................................................................... 42
Enable BranchCache on client computers....................................................................................42
Configure Windows Performance Monitor on client computers....................................................43
Verify BranchCache functionality.................................................................................................. 44
In a real world scenario, the content server is installed at your organizations main office, while the
client computers and hosted cache server are installed at a branch office. In addition, the branch
office is connected to the main office with DirectAccess, a virtual private network (VPN)
connection, or using some other remote access technology.
In this test lab scenario, all four computers are installed on the same local area network (LAN)
segment and are connected to a network hub using Ethernet cables. With this test lab
configuration, the network hub replaces the VPN or DirectAccess connection that would exist in
the real world scenario.
Content servers and content information
When you deploy a BranchCache-enabled file server, the file server automatically generates
identifiers for the content at the moment when the content is first requested by a BranchCacheenabled client computer. These content identifiers are called content information.
When a client requests content for the first time, the file server computes content information as it
transmits the content to the client. The file server then stores the content information for
subsequent client requests.
For this guide, however, instructions are provided so that you can manually generate content
information before client computers attempt to access the content. Because of this, the content
information exists prior to the first request for the content by the first client computer.
Windows 7 Enterprise
Windows 7 Ultimate
In Windows Server 2008 R2 Enterprise Core Install with Hyper-V, BranchCache is not
supported.
In Windows Server 2008 R2 Datacenter Core Install with Hyper-V, BranchCache is not
supported.
Note
Operating System
Computer Name
Content-01
Hosted-01
Windows 7 Enterprise or
Windows 7 Ultimate
Client-01
Windows 7 Enterprise or
Windows 7 Ultimate
Client-02
Computer Name
IP Address
Content server
Content-01
192.168.0.254
Hosted-01
192.168.0.100
Client computer
Client-01
192.168.0.1
Client computer
Client-02
192.168.0.2
name-to-IP address resolution services in your test lab, click Advanced. The Advanced
TCP/IP Settings dialog box opens. Click the WINS tab, and then click Add. Type the IP
address of the content server, 192.168.0.254, which will also act as a WINS server in the
test lab.
Note
You must configure the WINS server value on all four test lab computers,
including the content server that will act as a WINS server.
10. Click OK twice, and then click Close.
To install WINS
3.
Important
4. On the Select Server Roles page, select File Services, and then click Next.
7. On the Confirm Installation Selections page, confirm your selections, and then click
Install.
8. On the Installation Results page, confirm that your installation of the File Services role
and required role services completed successfully, and then click Close.
2. In Windows Explorer, in Hard Disk Drives, double-click Local Disk (C:). Windows
Explorer displays the local disk drive.
3. In Windows Explorer, click New folder. A new folder is created in the right pane with the
editable default name New folder. Replace the default name by typing Test_share, and
then press ENTER. Windows Explorer creates the folder with the name you provided.
4. Right-click the folder Test_share, click Share with, and then click Specific people.
5. The File Sharing dialog box opens. In File Sharing, click Administrator to ensure that
the Administrator account has Read and Write permissions for the share.
6. Click Share. The Network discovery and file sharing dialog box opens.
7. In the Network discovery and file sharing dialog box, click Yes, turn on network
discovery and file sharing for all public networks.
8. In File Sharing, you are notified that your folder is shared, and Individual items displays
the folder \\Content-01\Test_share.
9. In File Sharing, click Done. This returns you to Windows Explorer. Do not close the
window, as it is used in the next procedure.
In the next procedure, you will add sample content to the share by copying one file (ole32.dll)
from the Windows\System32 folder on the local computer to the Test_share folder that you just
created. In a production environment your shares will contain the content that your organization
employees need, however in the test lab all that is needed to demonstrate BranchCache is one
file that is over 64k in size. In this circumstance, the ole32.dll file serves the test lab purposes
well, because it is larger than this minimum size requirement. For this test lab, this file serves
solely as example shared content.
1. In Windows Explorer, double-click Windows. The Windows folder opens. Scroll down to
and double-click the folder System32.
2. In the Windows\System32 folder, scroll down to the file ole32.dll, right-click the file, and
then click Copy.
3. In Windows Explorer, click the Back arrow twice to return to local disk C, and then
double-click Test_share. The Test_share folder opens.
4. In Test_share, right-click the right pane, and then click Paste. The ole32.dll file is copied
into the Test_share folder and can now be used during the test lab as example file share
1. On Content-01, click Start, click Search programs and files, and then type command.
In search results, under Programs, right-click Command Prompt, and then click Run as
Administrator. The command prompt opens with the elevated privileges that are
required to run netsh commands.
2. At the command prompt, run the following command: hashgen f C:\Test_share.
1. On Hosted-01, click Start, click Administrative Tools, and then click Server Manager.
Server Manager opens.
2. In the Server Manager left pane, right-click Features, and then click Add Features. The
Add Features Wizard opens.
3. In the Add Features Wizard, in Features, select the BranchCache check box, and then
click Next.
4. In Confirm Installation Selections, review your choice and then click Install. The
Installation Progress pane is displayed during installation, and then the Installation
Results pane is displayed.
5. In Installation Results, review the summary and then click Close. The Add Features
Wizard closes.
6. In the Server Manager left pane, double-click Configuration, and then click Services.
7. In the details pane, in Services, double-click BranchCache. The BranchCache
Properties dialog box opens.
8. In the BranchCache Properties dialog box, on the General tab, verify that the
BranchCache service is started. If it is not already started, click Start to start the
BranchCache service, and then click OK.
Important
The BranchCache service startup type is Automatic, which means that the
BranchCache service starts whenever the computer is restarted. It is
recommended that you keep the startup type value set to Automatic.
You can use the following procedure to configure the BranchCache service mode on Hosted-01.
Because the hosted cache server is not a member of an Active Directory domain, the additional
parameter clientauthentication=NONE is included when you run the netsh branchcache set
service mode command.
To configure
enable BranchCache
Performance
hostedserver
Monitor
mode using network shell commands
9.
10.
1. On Hosted-01, click Start, click Search programs and files, and then type command.
In search results, under Programs, right-click Command Prompt, and then click Run as
Administrator. The command prompt opens with the elevated privileges that are
required to run netsh commands.
2. Run the following command: netsh branchcache set service mode=hostedserver
clientauthentication=NONE
Note
Running the netsh branchcache set service command both configures the
server computer to act as a hosted cache server and automatically configures
the computer firewall with the following inbound exceptions for hosted cache
mode: TCP port 80 and TCP port 443.
3. To verify that BranchCache hosted server mode is correctly configured on the computer,
run the following command: netsh branchcache show status. The BranchCache
Service Status is displayed in the command prompt window with the following values:
Service Mode: Hosted Server; Client Authentication: No Authentication; and
Current Status= Running.
4. Click Add, and then click OK. Note that the values for all BranchCache counters are
zero.
Note
its identity to client computers. After these instructions for IIS installation, this guide provides
instructions on how to create a self-signed certificate using IIS, how to export the certificate, and
how to import the certificate on client computers so that they trust the server certificate during the
authentication process with Hosted-01.
You must be a member of the IIS 7 Administrators group to perform this procedure.
1. On Hosted-01, click Start, point to Administrative Tools, and then click Server
Manager.
2. In Roles Summary, click Add Roles.
3. In the Add Roles Wizard, on the Before You Begin page, click Next.
4. On the Select Server Roles page, select Web Server (IIS), and then click Next.
Note
If an informational dialog box notifies you of required dependencies, click Add
Required Role Services to accept installation of the dependencies.
7. On the Confirm Installation Selections page, confirm your selections, and then click
Install.
8. On the Installation Results page, confirm that your installation of the Web Server (IIS) role
and required role services completed successfully, and then click Close.
1. On Hosted-01, click Start, click Run, and then type mmc. The Microsoft Management
Console (MMC) opens.
2. In the MMC, click File, and then click Add/Remove Snap-in. The Add or Remove
Snap-ins dialog box opens. In Available snap-ins, click Internet Information Services
(IIS) Manager, and then click Add. Click OK.
3. In the IIS console, double click Internet Information Services (IIS) Manager, and then
click Hosted-01 (HOSTED-01).
7. Click OK. IIS Manager creates a self-signed certificate named BranchCache, which is
displayed in IIS Manager. Do not close the MMC, as it is used in the next procedure.
You can use the following procedure to export the BranchCache certificate to a folder location on
Hosted-01.
You must be a member of the Administrators group to perform this procedure.
1. In the MMC, click File, and then click Add/Remove Snap-in. The Add or Remove
Snap-ins dialog box opens. In Available snap-ins, click Certificates, and then click
Add.
2. The Certificates snap-in page opens. On the Certificates snap-in page, click
Computer account, and then click Next.
3. In Select Computer, ensure that Local computer is selected, and then click Finish.
4. Click OK. The Certificates snap-in is added to the same MMC that contains the IIS
Manager snap-in. In the MMC, double-click Certificates (Local Computer), double-click
Personal, and then click Certificates. In the details pane, the BranchCache certificate
issued to Hosted-01 is displayed.
5. Right-click Hosted-01, click All Tasks, and then click Export.
8. In Export File Format, ensure that DER encoded binary X.509 (.CER) is selected, and
then click Next.
9. In File to export, click Browse, and then navigate to a folder location where you want to
save the certificate. In File name, type BranchCache, and then click Save. The Browse
dialog box closes and the File to export page is displayed with the file location and file
name that you selected. For example, if you selected a file location of C: and a file name
of BranchCache, C:\BranchCache.cer is displayed.
10. Click Next, and then click Finish. An information dialog box opens that displays the
message The export was successful. Click OK.
Important
11. If needed, click Finish. Using Windows Explorer, navigate to the file location where you
saved the certificate. Copy the certificate and save the certificate to a file location on both
Client-01 and Client-02.
7. Click Next. In File to import, click Browse. In the Open dialog box, navigate to the
folder location where you saved the BranchCache.cer file. Select the file and click Open.
10. Click Finish. An information dialog box opens that displays the message The import
was successful. Click OK.
Note
Important
Important
4. Click Add, and then click OK. Note that the values for all BranchCache counters are
zero. The following illustration displays performance counters configured on Client-01.
3. In WINS, click Active Registrations. Note that no WINS records are displayed in the
right pane yet. Right-click Active Registrations, and then click Display Records. The
Display Records dialog box opens.
4. In Display Records, on the Record Mapping tab, click Find Now.
5. The Display Records dialog box closes, and the WINS registrations for all computers
that have registered a record with the server are displayed in Active Registrations.
6. In Active Registrations, you should see both [00h] Workstation and [20h] File Server
WINS records for all computers on the network, including Client-01, Client-02, Content01, and Hosted-01, as illustrated in the example below.
Important
If all computers have registered records in the WINS database, your test network is
installed correctly, and you can continue with the BranchCache tests in this guide.
If one or more computers have not registered records in WINS, do the following:
a. Verify that you have configured the WINS server IP address in TCP/IP v4 network
connection properties according to the instructions provided in the topic Configure a
static IP address.
b. Either restart the computer so that it automatically registers its NetBIOS name with
the WINS server or run the following command at the command prompt to release
and then renew the name record registration with the WINS server: nbtstat -RR
In order for you to successfully perform the procedures in this guide, Content-01 must
register its own record in the WINS database. If Content-01 has not registered a record in
WINS, configure the TCP/IP v4 properties of the network connection on Content-01 with
its own IP address as the WINS server. This will cause Content-01 to register its own
record if it has not already done so.
Note
Important
A Microsoft WINS server record includes the WINS client NetBIOS name, IP address,
and a value called a version ID. When you release and renew the record, an existing
records version ID is incremented or a new record is registered. When you run nbtstat
-RR, a timer is invoked so that the command cannot be successfully run again for 2
minutes. This delay is provided to prevent a WINS server from becoming saturated by
client renewal requests. The RR portion of the command syntax is case sensitive.
c.
After you download content to Client-02, the performance counters on Client-02 show
that the content was obtained from the cache on Hosted-01, while the content
information was obtained from the content server:
Note
21.
1. On Hosted-01, Client-01, and Client-02, delete all BranchCache cached content by using
the following command at the command prompt: netsh branchcache flush.
2. If there are any open instances of Windows Explorer on the computer, close Windows
Explorer.
3. On Client-01 and Client-02, delete content from the Offline Files cache:
a. Click Start, click Search, and then type Manage offline files. In search results, click
Manage offline files. The Offline Files dialog box opens.
b. In the Offline Files dialog box, click the Disk Usage tab, and then click Delete
temporary files.
4. On all three client computers, restart the computer to reset the counters in Performance
Monitor.
Note
You might need to reconfigure Windows Performance Monitor with BranchCache
performance counters after you restart the computer. If this is the case, add the
performance counters that are specified in the topics Configure Windows
Performance Monitor on client computers (on client computers) and Configure
Windows Performance Monitor on Hosted-01 (on the hosted cache server) in this
guide.
Additional Resources
For more information about the technologies in this guide, see the following resources: