Branchcache demonstration, part 2

Welcome back to my Branchcache demonstration.

Configure the Hosted Cache server

Picking up where part 1 left off, 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

BC_hc_confirm1

and further down

BC_hc_confirm2

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

BC_client_gpo1

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.

BC_client_confirm1

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

BC_hostedcache_demoresult

“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. Looks great! 🙂

Finally, if you want to read more aboiut 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

Branchcache demonstration, part 1

Introduction to Branchcahce

Branchcache was introduced in Windows Server 2008 R2 and it is a tool to reduce the impact of having low bandwidth between a branchoffice and a central file server. The short description would be that either a dedicated server, or the clients themselves, cache the content when a file is opened or copied across the WAN link. When the next client access the same file, most of the content is available on the LAN and the need to copy data across the WAN link is reduced, resulting in a better user experience.

If you want to read more about Branchcache you can check out my own post about it: https://pertorben.wordpress.com/2012/05/29/dfs-r-or-branchcache/

In Windows Server 2012 there has been many improvements to Branchcache. A few highlights include:

  • No limitation to number of hosted cache servers in each branch office
  • No need for a separate GPO for each site
  • No need to deploy a certificate to the hosted cache servers
  • Clients can autoconfigure between hosted cache and distributed cache mode
  • Duplicate content is only downloaded once
  • Cache is encrypted by default
  • Cache can now be pre-loaded

Full list of changes are located here: http://technet.microsoft.com/en-us/library/jj127252.aspx

Branchcache can operate in either “hosted cache mode” where a server in the branch office stores the cache, or in “distributed cache mode” where the clients store and shares the cache among themselves. Now I want to make a simple demonstration of Branchcache in hosted cache mode using Windows Server 2012 and Windows 8. First of all:

The lab setup

  • 1 domain divided in 2 sites “HQ” and “SmallOffice” (guess which one is the branch office) with a DC in each site.
  • 1 centralized file server as “content server” (the server containing the files)
  • 1 server in the branch office as “hosted cache server” (the server containing the cache of the content)
  • 2 clients in the branch office
  • All servers are Windows Server 2012, all clients are Windows 8

AD Sites is one of the key components here so make sure you define your sites and subnets correctly.

Setting up the content server

In Windows Server 2012 Powershell is dramatically expanded and improved so it’s no surprise that we use Powershell in the implementation  On the newly installed Windows Server open Powershell and run

Install-WindowsFeature FS-BranchCache -IncludeManagementTools

Restart-Computer

Next up is to enable the hash publication of the content server. Here we make a GPO and link it to the OU containing the content server. 2 simple settings located under “Computer Configuration, Policies, Administrative Templates, Network, Lanman Server”. Once it’s deployed it’s time for a “gpupdate” on the content server

BC_gpo1

After the group policy is set you have to share a folder and enable brachcache on that share. Simpe way to do so in the GUI

BC_fileshare1

Now that the content server is ready I’m gonna fill it up with some files and in part 2 we will set up the Hosted cache server and the clients and I’ll do a proof of concept.

See you in part 2!

I love the new Server Manager, part 2

DISCLAIMER:
This article contains some information from Windows 8. Windows 8 is currently in beta and there’s no guarantee that the final product will behave the same or contain the same features. Nothing in Windows 8 is final and everything is subject to change.

Ok, going on from part 1 where I introduced the new server manager in Windows 8 server beta. The best part is coming right up, and that’s the approach Microsoft have put into centralized management of several servers, also those that are not in your AD.

Notice the “All Servers” link on the left side? By right-clicking  there or in the “manage” menu on the top-right, you can add other Windows 8 Servers to manage. These can be in the same or another Active Directory or they can be standalone servers. When the new servers are added, several cool things happen. The servers are added to “all servers” as a list where you can see basic information as IP, events, services, BPA results and even a simple performance monitor on each server. Additionally the server manager automatically creates a group for each server role and group the servers by their installed roles. And the  servers are moved in and out of these groups on the fly when you add or remove roles. Ref the screenshot below you can see that I have serves that are AD, DNS, DHCP etc and when you navigate into each group you see only the servers, services and event that are relevant to that group. A real life example would be that you’ll automatically have all your Win8 Domain Controllers grouped and if you navigate into this group you will only see the domain controller-relevant services and events and you don’t have to filter out those services and events yourself. That is really awesome when you have to troubleshoot or just do a quick health inspection.

“All Servers” and the automatically added server groups

Another magic part in the new server manager is when you right-click a server you’ve added. Here you find everything you need for remote management. All role-spesific tools depending on which roles the server has installed. You can also remotely reboot, add roles and features, start up powershell or an rdp-session. You can even configure NIC teaming from here. As I just wrote, everything you need for remote management.

Right-click shows you the magic of Server Manager

By default Windows 8 Server are installed as a Server Core and I think it is a really good move. Now that Server Manager gives you basically everything you need for remote management you can have your servers in either “Core” or “minimal interface” configuration and manage it all from your workstation. Server Manager and powershell will probably suit all your needs, and should you absolutely need a GUI you can always add it and then remove it after you’re done with it.

Next time I’ll show and explain Server Core, minimal interface and full interface versions of Windows Server 8.

I love the new Server Manager, part 1

DISCLAIMER:
This article contains some information from Windows 8. Windows 8 is currently in beta and there’s no guarantee that the final product will behave the same or contain the same features. Nothing in Windows 8 is final and everything is subject to change.

Hello.

There is no doubt: I love the new Server Manager in the Windows Server 8 beta, which will be named Windows Server 2012 at release. The main reason for this is that it takes a huge step towards centralized management, and there is no problem whatsoever to manage several servers from a single Server Manager console.

In the dashboard, which is the default screen after launching the Server Manager, you can see the status of one or several servers at a glance, and on the top, right corner you have the common menues which also changes slightly depending on which server you highlight, I’ll come back to that one later. The Flag-icon will light up yellow or red if there is a warning or error with any tasks running. The “Manage” menu allows you to add or remove roles and features from any server you have in your servermanager. Oh yes, you can remotely add and remove any roles or features from 1 single location on 1 single computer! 🙂 Also you can apply the changes to a VHD-file and use this to apply these changes on other servers.  The “Tools” menu replaces “administrative tools” from the previous versions and here you find the tools you use to manage the different server roles and this menu changes depending on which server you have chosen. So when you have select a domain controller you’ll see the different tools for administrating AD, but if you then select a file servers those tools are no longer present on that menu.On the left side you can select the dashboard, local server, all servers which shows all servers you have added, and the different server groups you’ve added either manually or automatically.

On the Local server screen you configure typical 1 time only tasks like computer name, IP-addresses, Windows Update settings, NIC teaming. These settings only apply to the local server and I have not found a way to set these on a remote server. This is however not a big deal in my opinion as these are typical pre-production settings which you rarely change after a server is set into prodution.

In part 2 I’ll go trough the really juicy part, where we look into how to manage several servers from one console.

Windows 8 and mapping network drives…

First of all:

DISCLAIMER:
This article contains some information from Windows 8. Windows 8 is currently in beta and there’s no guarantee that the final product will behave the same or contain the same features. Nothing in Windows 8 is final and everything is subject to change.

Ok down to business; I assume this is a bug:

If you are using Group Policy Preferences to map your network drives, you may notice that the mapping fails when you log on to client with Windows 8 Consumer Preview (despite gpresult and event logs says things are fine). Some quick testing proves that this occur when you log on with a user account that has local administrator rights, and if you remove your user account from the local administrators group the drives will reappear next time you log in.

Why you would log in with an administrative account is another discussion so I’m just gonna go right ahead and say it for now: You should not! If you want more information why you shouldn’t, then stay tuned to this blog and I’ll tell you more another time.