How to Enable BranchCache On Netapp CIFS shares

Laptop displaying code next to a notebook and pen on a wooden desk, ideal for programming and study sessions.

Introduction

In distributed environments, remote offices often struggle with slow file access due to high latency and limited WAN bandwidth. BranchCache, a WAN optimization feature from Microsoft, solves this by allowing local caching of frequently accessed files, significantly improving performance.

For organizations using NetApp CIFS shares, enabling BranchCache ensures that remote users experience faster file retrieval, reduced WAN congestion, and improved productivity. By caching content locally, BranchCache eliminates the need to repeatedly download the same files from a central server, making it a valuable tool for branch offices.

What This Guide Covers

This step-by-step guide will walk you through:
✅ Verifying prerequisites and SMB protocol settings
✅ Configuring BranchCache on NetApp CIFS shares
✅ Setting up client devices to use BranchCache
✅ Testing and troubleshooting common issues
✅ Implementing best practices for performance and security

By the end of this guide, you’ll have a fully optimized NetApp CIFS environment with BranchCache enabled, ensuring seamless file access for remote users. Let’s get started!

Table of Contents

  1. Introduction
  2. Prerequisites
  3. Verifying SMB Protocol Settings
  4. Configuring BranchCache on the NetApp CIFS Server
  5. Enabling BranchCache on CIFS Shares
  6. Client-Side Configuration
  7. Verifying and Testing BranchCache
  8. Best Practices
  9. Conclusion

Prerequisites

Before enabling BranchCache on your NetApp CIFS shares, ensure that your environment meets the following requirements.

1. ONTAP Version Compatibility

BranchCache is supported in NetApp ONTAP but requires a compatible version. Check your ONTAP version with:

cluster version show

Ensure you’re running ONTAP 9 or later for full BranchCache support.

2. CIFS License & SMB Server Configuration

BranchCache relies on CIFS (SMB) file sharing, which requires a valid license. To verify:

vserver cifs show

If CIFS is not enabled, configure it using:

vserver cifs create -vserver <vserver_name> -cifs-server <server_name> -domain <domain_name>

3. Network & SMB Protocol Requirements

For BranchCache to function, your SMB server must support the correct protocol version:

  • BranchCache v1 requires SMB 2.1 or later
  • BranchCache v2 requires SMB 3.0 or later

To check your SMB protocol settings, use:

vserver cifs options show -vserver <vserver_name>

If necessary, enable the required SMB version:

vserver cifs options modify -vserver <vserver_name> -smb2-enabled true
vserver cifs options modify -vserver <vserver_name> -smb3-enabled true

4. Windows Client Compatibility

BranchCache is a Windows feature, so ensure your remote clients are running:
✅ Windows 7+ (Professional, Enterprise, or Ultimate)
✅ Windows Server 2008 R2+

To confirm that BranchCache is enabled on a Windows client, run:

Get-BCStatus

If BranchCache is disabled, enable it with:

Enable-BCLocal

Next Steps

With all prerequisites checked, the next step is to verify SMB protocol settings and ensure your NetApp CIFS server is correctly configured. Let’s dive in!

Verifying SMB Protocol Settings

Before enabling BranchCache on NetApp CIFS shares, you must ensure that the correct SMB protocol versions are enabled. This section will guide you through checking and configuring SMB settings on your NetApp storage system.

1. Check Current SMB Protocol Settings

To verify which SMB versions are enabled on your NetApp CIFS server, run the following command:

vserver cifs options show -vserver <vserver_name>

Look for the SMB2 Enabled and SMB3 Enabled fields in the output. If SMB 2.1 or SMB 3.0 is disabled, you will need to enable them.

2. Enable SMB 2.1 (Required for BranchCache v1)

If SMB 2.1 is not enabled, turn it on with the following command:

vserver cifs options modify -vserver <vserver_name> -smb2-enabled true

This enables both SMB 2.0 and SMB 2.1, ensuring compatibility with BranchCache v1.

3. Enable SMB 3.0 (Required for BranchCache v2)

To enable SMB 3.0 for BranchCache v2 support, use:

vserver cifs options modify -vserver <vserver_name> -smb3-enabled true

4. Confirm the Changes

After modifying the SMB settings, re-run the following command to confirm that the changes were applied:

vserver cifs options show -vserver <vserver_name>

You should now see that SMB 2.1 and SMB 3.0 are both enabled.

5. Restart CIFS Service (If Necessary)

If the changes do not take effect immediately, restart the CIFS service on the SVM:

vserver cifs stop -vserver <vserver_name>
vserver cifs start -vserver <vserver_name>

Next Steps

Now that the correct SMB protocol versions are enabled, you’re ready to configure BranchCache on your NetApp CIFS server. The next section will guide you through setting up the hash store and enabling BranchCache on your SVM.

Configuring BranchCache on the NetApp CIFS Server

Now that SMB 2.1 or SMB 3.0 is enabled, the next step is to configure BranchCache on your NetApp CIFS server. This involves setting up a hash store, enabling BranchCache, and choosing the appropriate operating mode.

1. Create a BranchCache Hash Store

BranchCache requires a dedicated hash store where metadata for cached files is stored. To create a hash store, run the following command:

vserver cifs branchcache create -vserver <vserver_name> -hash-store-path /vol/branchcache -hash-store-max-size 20GB


Replace <vserver_name> with your SVM name.
  • Adjust the hash store path and max size based on available storage.

2. Enable BranchCache on the SVM

Once the hash store is created, enable BranchCache on the SVM with:

vserver cifs branchcache modify -vserver <vserver_name> -enabled true

3. Configure BranchCache Versions

Specify which BranchCache versions to support:

  • Enable BranchCache v1 only (for SMB 2.1 clients):shellCopyEditvserver cifs branchcache modify -vserver <vserver_name> -versions enable-v1
  • Enable BranchCache v2 only (for SMB 3.0 clients):shellCopyEditvserver cifs branchcache modify -vserver <vserver_name> -versions enable-v2
  • Enable both v1 and v2 (Recommended for mixed environments):shellCopyEditvserver cifs branchcache modify -vserver <vserver_name> -versions enable-all

4. Set the Operating Mode

BranchCache can operate in two modes:

  • Per-Share Mode (Recommended) – Allows BranchCache to be enabled on specific CIFS shares.shellCopyEditvserver cifs branchcache modify -vserver <vserver_name> -operating-mode per-share
  • All-Shares Mode – Enables BranchCache on all CIFS shares automatically.shellCopyEditvserver cifs branchcache modify -vserver <vserver_name> -operating-mode all-shares

5. Verify the Configuration

To check the current BranchCache settings, use:

vserver cifs branchcache show -vserver <vserver_name>

This will display the hash store location, BranchCache versions, and operating mode.

Next Steps

With BranchCache enabled on the CIFS server, the next step is to enable BranchCache on specific CIFS shares to control which data is cached. The next section will cover this process in detail.

Enabling BranchCache on CIFS Shares

Now that BranchCache is configured at the SVM level, you need to enable it on specific CIFS shares. This allows you to control which shares use BranchCache for optimized file access.

1. List Available CIFS Shares

Before enabling BranchCache, check the existing CIFS shares on your NetApp system:

vserver cifs share show -vserver <vserver_name>


This command lists all configured CIFS shares along with their properties.

2. Enable BranchCache on a Specific Share

To enable BranchCache on an individual CIFS share, run:

vserver cifs share properties add -vserver <vserver_name> -share-name <share_name> -share-properties branchcache


Replace <vserver_name> with the name of your SVM.
  • Replace <share_name> with the name of the CIFS share.

3. Verify That BranchCache is Enabled on the Share

After enabling BranchCache, confirm that it is active by running:

vserver cifs share show -vserver <vserver_name> -share-name <share_name>

You should see “branchcache” listed under Share Properties in the output.

4. Enable BranchCache on Multiple Shares (Optional)

If you want to enable BranchCache on multiple CIFS shares at once, use a looped command. for share in share1 share2 share3; do:

vserver cifs share properties add -vserver <vserver_name> -share-name $share -share-properties branchcache
done

Replace share1, share2, etc., with the actual CIFS share names.

5. Remove BranchCache from a Share (If Needed)

If you ever need to disable BranchCache on a specific share, use:

vserver cifs share properties remove -vserver <vserver_name> -share-name <share_name> -share-properties branchcache

Next Steps

With BranchCache now active on selected CIFS shares, the next step is configuring Windows client devices to take advantage of BranchCache caching. The next section will guide you through enabling and verifying BranchCache on Windows clients

Client-Side Configuration

After enabling BranchCache on NetApp CIFS shares, you must configure Windows client devices to take advantage of caching. This section covers enabling BranchCache on Windows, configuring Group Policy settings, and verifying functionality.

1. Check BranchCache Status on the Client

To verify whether BranchCache is enabled on a Windows client, open PowerShell as an administrator and run:

Get-BCStatus


If BranchCache is disabled, proceed with the following steps to enable it.

2. Enable BranchCache on Windows Clients

For individual machines, enable BranchCache by running:

Enable-BCLocal

This enables local caching of files retrieved from the CIFS share.

For environments with multiple remote clients, use Group Policy to enable BranchCache across all devices.

3. Enable BranchCache via Group Policy (Recommended for Enterprises)

To apply BranchCache settings across multiple Windows clients, configure Group Policy (GPO):

  1. Open Group Policy Management Console (GPMC) on a Windows server.
  2. Navigate to:nginxCopyEditComputer Configuration → Policies → Administrative Templates → Network → Offline Files
  3. Enable the following settings:
    • Turn on BranchCacheEnabled
    • Set BranchCache Distributed Cache Mode (for branch office caching)
    • Set BranchCache Hosted Cache Mode (if using a dedicated cache server)
  4. Apply the policy to your Active Directory Organizational Unit (OU) containing branch office computers.
  5. Run gpupdate on client machines to apply changes immediately:gpupdate /force

4. Verify BranchCache is Working

Once BranchCache is enabled, confirm it is caching CIFS share files:

Check Cache Statistics

On a Windows client, run:

Get-BCDataCache


This should display cached content information, confirming that BranchCache is functioning.

Test File Access Speed

  1. Open a large file from the CIFS share on a client device.
  2. Close the file and disconnect from the network.
  3. Reopen the same file—if BranchCache is working, it should open quickly from the local cache.

Next Steps

Now that both NetApp CIFS shares and Windows clients are configured, the next section will guide you through verifying and troubleshooting BranchCache to ensure optimal performance.

Also See: Collecting Perfstat files from 7-mode Netapp!

Verifying and Testing BranchCache

After enabling BranchCache on NetApp CIFS shares and configuring Windows clients, it’s essential to verify that caching is working as expected. This section covers how to check BranchCache performance, test caching behavior, and troubleshoot common issues.

1. Check BranchCache Status on Windows Clients

To confirm that BranchCache is enabled and running on a Windows client, open PowerShell as an administrator and run:

Get-BCStatus
  • BranchCache service mode: Should show Distributed Cache or Hosted Cache, depending on your configuration.
  • Service status: Should display Running.

If BranchCache is not enabled, refer to the Client-Side Configuration section to enable it.

2. Verify Cached Data on Clients

To check what data has been cached by BranchCache, use:

Get-BCDataCache

This command displays information about cached files, including the cache size and the number of cached segments.

3. Test File Retrieval from BranchCache

To verify that files are being served from cache instead of the CIFS share over WAN:

  1. Open a large file (e.g., a 50MB document) from the CIFS share on a client computer.
  2. Close the file and disconnect the client from the corporate network.
  3. Reopen the same file.
    • If BranchCache is working correctly, the file should load instantly from the local cache.

4. Check NetApp BranchCache Statistics

To monitor BranchCache usage on NetApp, run:

vserver cifs branchcache show -vserver <vserver_name>

This displays:
✅ Hash store size
✅ Number of cached files
✅ BranchCache-enabled shares

5. Troubleshooting Common Issues

IssuePossible Fix
Get-BCStatus shows “Disabled”Run Enable-BCLocal on the client machine. Ensure BranchCache is enabled via Group Policy if managing multiple devices.
Cached files are not loadingVerify that BranchCache is enabled on the CIFS share with vserver cifs share show.
Performance is slowCheck Get-BCDataCache to see if the client has stored cached files. If not, ensure SMB 2.1+ is enabled on the CIFS server.
Windows clients not retrieving cached dataRun gpupdate /force to apply Group Policy settings. Verify firewall settings to allow BranchCache traffic.

Next Steps

Now that BranchCache is verified and working, the next section will cover best practices for optimizing performance, security, and long-term maintenance.

Best Practices

To ensure BranchCache on NetApp CIFS shares runs efficiently and securely, follow these best practices for performance optimization, security, and maintenance.

1. Optimize Cache Storage and Performance

  • Adjust Hash Store Size: The default BranchCache hash store size may not be sufficient for large environments. Increase it based on network traffic and file usage:vserver cifs branchcache modify -vserver <vserver_name> -hash-store-max-size 50GB
  • Monitor Cache Utilization: Regularly check how much cache is being used:Get-BCDataCache
  • Use SSD Storage for Hash Store: Storing BranchCache data on SSD-backed volumes can improve read speeds and reduce latency.

2. Enforce Security and Access Controls

  • Use NTFS and SMB Permissions: Ensure CIFS shares have proper read/write permissions to prevent unauthorized access.
  • Restrict BranchCache to Authorized Clients: Use Group Policy to disable BranchCache for non-branch office users.
  • Encrypt Cached Data: If security is a concern, configure Windows BitLocker to encrypt cached content on clients.

3. Enable Logging and Monitoring

  • Enable Audit Logging on NetApp:vserver cifs audit enable -vserver <vserver_name>
  • Monitor BranchCache Performance on Clients:Get-BCNetworkStatistics This command helps identify if files are being retrieved from the local cache instead of over the WAN.

4. Regularly Update ONTAP and Windows Clients

  • Keep NetApp ONTAP updated to benefit from performance improvements and security patches.
  • Ensure Windows clients have the latest BranchCache updates via Windows Update or WSUS.

5. Test and Validate Regularly

  • Periodically test file access speeds to ensure BranchCache is reducing WAN traffic.
  • Run:Measure-Command { Get-Content \\cifs_share\largefile } This measures how long it takes to retrieve a file—faster times indicate BranchCache is working correctly.

Next Steps

Following these best practices ensures BranchCache remains efficient and secure. In the next section, we’ll summarize key takeaways and provide additional resources for further learning.

Conclusion

Enabling BranchCache on NetApp CIFS shares significantly improves file access speeds for remote users while reducing WAN bandwidth usage. By caching frequently accessed files locally, BranchCache enhances user experience and optimizes network performance.

Key Takeaways

✅ Verified prerequisites – Ensured NetApp ONTAP, CIFS, and SMB were correctly configured.
✅ Enabled BranchCache on NetApp CIFS shares – Set up the hash store and configured operating modes.
✅ Configured Windows clients – Enabled BranchCache using PowerShell and Group Policy.
✅ Tested and verified performance – Checked cache usage and file retrieval speeds.
✅ Applied best practices – Optimized cache storage, enforced security, and enabled monitoring.

Next Steps

  • Monitor BranchCache performance using Get-BCNetworkStatistics.
  • Regularly test file access speeds to confirm caching is working.
  • Stay updated with NetApp ONTAP and Windows BranchCache documentation.

By implementing these steps, your organization can maximize BranchCache efficiency, ensuring seamless file access for remote offices while maintaining security and performance. 🚀

Netapp Documentation

Creating Share:
https://library.netapp.com/ecmdocs/ECMP1401220/html/GUID-06CCA071-D741-40A2-A23A-61FE36930D33.html

Enabling Branch Cache on storage system:
https://library.netapp.com/ecmdocs/ECMP1401220/html/GUID-A6D289F1-135A-49E7-BBAD-2328A63F491D.html

Elevate Your IT Efficiency with Expert Solutions

Transform Your Technology,
Propel Your Business

Unlock advanced technology solutions tailored to your business needs. At Inventive HQ, we combine industry expertise with innovative practices to enhance your cybersecurity, streamline your IT operations, and leverage cloud technologies for optimal efficiency and growth.