<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Hybrid Networking | Cloud and OnPrem</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/netgeeks/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/netgeeks/feed.xml</link>
    <description />
    <lastBuildDate>Thu, 13 Jun 2019 14:20:25 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>WinHTTP Proxy Settings deployed by GPO</title>
      <link>https://docs.microsoft.com/archive/blogs/netgeeks/winhttp-proxy-settings-deployed-by-gpo</link>
      <pubDate>Tue, 19 Jun 2018 17:37:20 GMT</pubDate>
      <dc:creator><![CDATA[Dante Stancato]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/netgeeks/?p=1055</guid>
      <description><![CDATA[Hello everyone! Dante here, once again, trying to help you get a new trick to be delighted.
Have...]]></description>
      <content:encoded><![CDATA[Hello everyone! Dante here, once again, trying to help you get a new trick to be delighted.
Have you ever wondered how would you configure the proxy for Windows components such Windows Update, the NCSI and others? You probably know you can do that manually on each machine you need, which is very cool, but what happens when you have more than 100 servers you need to configure for this feature?
Don't worry, you don't need to hire slave-script-writers monkeys, just need to know 3 things:
<ul>
 	<li>Where do I configure the proxy for Windows components?</li>
 	<li>Where is this configuration stored?</li>
 	<li>How can I massively deploy that information?</li>
</ul>
Let's start for the beginning. Windows has 2 places where you can configure the proxy:
<ul>
 	<li>Internet Settings Control Panel (or inetcpl.cpl for you guys who are advanced users)</li>
 	<li>WinHTTP Windows Services.</li>
</ul>
The main difference between them is that the Internet Settings Control Panel works at the User level, while the WinHTTP Windows Component works globally at the computer level. In <a href="https://blogs.msdn.microsoft.com/askie/2015/10/12/how-to-configure-proxy-settings-for-ie10-and-ie11-as-iem-is-not-available/">this note</a> you can see how to deploy the Internet Settings Control Panel configurations for Proxy for the latest versions by GPO. That's amazing, but will only apply at the user level.

In some scenarios, you would love to have your Windows servers use a proxy to contact Windows Update services to download the updates, instead of the direct contact to the internet, since it will let you have more control of your traffic. If you don't have a Proxy server configured in the WinHTTP Services, your machine will try to directly contact the internet for any web traffic coming, for example, from the Windows Update service, so you will have no control on such communications. For Windows Update management and centralization in enterprise environment we highly recommend using <a href="https://docs.microsoft.com/en-us/windows-server/administration/windows-server-update-services/get-started/windows-server-update-services-wsus">WSUS</a> instead of the normal Windows Update service, but that depends on you.

<b>Now, coming back to our topic, how can I configure the proxy for the WinHTTP Services?
</b>

There is a simple way to do that, by issuing the following command on a command prompt with elevated privileges:

<code>netsh winhttp set proxy &lt;server IP or FQDN&gt;:&lt;Port&gt; "&lt;Exclusion list, separated by ";"&gt;"</code>

As an example, this command will configure the address proxy.contoso.com in port 8080, with the exclusion of "localhost" and "contoso.com" domain:

<code>netsh winhttp set proxy proxy.contoso.com:8080 "localhost;*.contoso.com"</code>

Looking at the help of the command will show you some other parameters that can be used:

<code>C:\WINDOWS\system32&gt;netsh winhttp set proxy ?</code><code>
</code><code>Usage:  set proxy [proxy-server=]&lt;server name&gt; [bypass-list=]&lt;hosts list&gt;</code><code>
</code><code>Parameters:</code><code>
</code><code> Tag             Value</code><code>
</code><code>  proxy-server  -  proxy server for use for http and/or https protocol</code><code>
</code><code>  bypass-list   -  a list of sites that should be visited bypassing the</code><code>
</code><code>                   proxy (use "&lt;local&gt;" to bypass all short name hosts)</code><code>
</code><code>
</code><code>Examples:</code><code>
</code><code>
</code><code>  set proxy myproxy</code><code>
</code><code>  set proxy myproxy:80 "&lt;local&gt;;bar"</code><code>
</code><code>  set proxy proxy-server="http=myproxy;https=sproxy:88" bypass-list="*.foo.com"</code>

<code></code>

You can also import the settings from the Internet Settings Control Panel, but bear in mind the WinHTTP Services do not support the use of Scripts (like PAC or DAT files). For such behavior you can use following command:

<code>netsh winhttp import proxy source=ie</code>

Again, this works only for the manual section of the Internet Settings Control Panel proxy configuration, does not work for the automatic detection or the scripts.

The last part would be to check and ensure your proxy settings got properly applied to the WinHTTP Services. You can achieve that by issuing the following command:

<code>netsh winhttp show proxy</code>

Depending on the configuration, the output will look like this if nothing got applied:

<code>C:\WINDOWS\system32&gt;netsh winhttp sh proxy</code><code>
</code><code>
</code><code>Current WinHTTP proxy settings:</code><code>
</code><code>
</code><code>    Direct access (no proxy server).</code>

Or something like this if you had your proxy settings properly updated:

<code>C:\WINDOWS\system32&gt;netsh winhttp sh proxy</code><code>
</code><code>
</code><code>Current WinHTTP proxy settings:</code><code>
</code><code>
</code><code>    Proxy Server(s) :  proxy.contoso.com:8080</code><code>
</code><code>    Bypass List     :  localhost;*.contoso.com</code>

If you have everything properly set up and want to get back to direct connection, you'll need to issue the following command:

<code>netsh winhttp reset proxy</code>

<b>Alright, I totally understood how all this WinHTTP proxy stuff works but, where is all that data stored in Windows?</b>

That's a great question! Since you now know how to configure your proxy at system level, you now need to know where to look for that information.
All those configurations are stored in a registry key located in the following path:

<code>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Connections</code>

Under the following Key name:

<code>Key Name: WinHttpSettings</code><code>
</code><code>Type: Binary</code><code>
</code><code>Value (for Direct Access or No Proxy): 1800000000000000010000000000000000000000</code>

When you modify the actual settings, and look for the new value, in the registry it will look like this:

<img width="600" height="323" class="alignnone size-full wp-image-1065" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/06/WinHttpProxy1.png" />
<b>Perfect! I already know how to configure it and where it is stored. Thank you! Now... What do I do with this information?</b>

Now you already have the proper proxy configuration and the registry key, the only thing you need to do is to deploy these settings through a Group Policy Preference (or GPP)!
Let's begin with the process. I encourage you to do this from a simple workstation that will not affect your production environment. Doing this in a Domain Controller, for example, may get you in serious trouble, and saying this I totally disclose any responsibility in you :)

First Step: Open a Group Policy Management Console (or gpmc.msc from the command prompt) and create a new Group Policy Object with a name (I will do it as TestWinhttpProxy)

<img width="651" height="352" class="alignnone size-full wp-image-1075" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/06/WinHttpProxy2.png" />

Second Step: Edit the GPO and locate the following path: <i>Computer Configuration &gt; Preferences &gt; Windows Settings &gt; Registry</i>

<img width="469" height="384" class="alignnone size-full wp-image-1085" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/06/WinHttpProxy3.png" />

Third Step: Right Click on the Registry item and select <i>"New &gt; Registry Item"</i>

<img width="450" height="383" class="alignnone size-full wp-image-1095" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/06/WinHttpProxy4.png" />

Fourth Step: In General tab leave action as "Update" and browse for your local WinHttpSettings registry key.

<img width="801" height="525" class="alignnone size-full wp-image-1105" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/06/WinHttpProxy5.png" />

Fifth Step: Hit OK and Close the editor. You should see something like this (mine is showing the No Proxy configuration):

<img width="789" height="298" class="alignnone size-full wp-image-1115" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/06/WinHttpProxy6.png" />

Sixth and last Step: Link the GPO to the desired OU.

<img width="466" height="311" class="alignnone size-full wp-image-1125" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/06/WinHttpProxy7.png" />

<img width="611" height="591" class="alignnone size-full wp-image-1135" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/06/WinHttpProxy8.png" /> <img width="738" height="270" class="alignnone size-full wp-image-1145" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/06/WinHttpProxy9.png" />

Once you have all of this already setup you can just wait in your comfortable chair drinking a cup of coffe until the GPO applies or simply go to a target machine and execute a <em>GPUPDATE /FORCE</em> to make it happen <span style="text-decoration: underline">NOW</span>!

If everything went as we expect you should see the new configuration in place by doing the "show proxy" Network Shell command for WinHTTP.

Hope you enjoyed this entry and see you soon!]]></content:encoded>
    </item>
    <item>
      <title>A word about AutoTuningLevel - TCP Receive Window Auto-Tuning Level explained</title>
      <link>https://docs.microsoft.com/archive/blogs/netgeeks/a-word-about-autotuninglevel-tcp-receive-auto-tuning-level-explained</link>
      <pubDate>Mon, 21 May 2018 13:49:00 GMT</pubDate>
      <dc:creator><![CDATA[Dante Stancato]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/netgeeks/?p=1035</guid>
      <description><![CDATA[Hello Everyone!
This is Dante again, and today I have a new note for you that hope will help you...]]></description>
      <content:encoded><![CDATA[Hello Everyone!
This is Dante again, and today I have a new note for you that hope will help you keep understanding how Windows Networking works.
For today's note, we will talk a bit about how Windows handle the TCP Receive Window size since Windows Server 2008 / Windows Vista.
In previous releases, the TCP Receive Window size for every network communication in Windows had a statically assigned value for the TCP Receive Window size, se we could define this parameter to improve our communications in fast links (but that could cause severe isssues in not that fast links). That behavior is better explained in <a href="https://support.microsoft.com/en-us/help/224829/description-of-windows-2000-and-windows-server-2003-tcp-features">this article</a>.
With newer versions, that is no more possible, since we introduced a new feature called TCP Receive Window Auto Tunning Level. That sounds cool, right?

<strong><em>But, how does it work?</em></strong>

In newer versions of Windows, the TCP Receive Window Auto Tuning Level (from now on "the autotuninglevel"), has the ability to negotiate a defined Receive Window size for every TCP communication, which is being done at the TCP Handshake.
This feature also makes full use of other features for improving network performance, such the rest of the TCP Options defined in <a href="https://tools.ietf.org/html/rfc1323">RFC 1323</a>. This enables the Windows machine to negotiate Window sizes which are "smaller" but scaled at a defined value, depending on the configuration, which makes it easier to be handled by several networking devices.

<strong><em>That sounds great, but how can we configure that?</em></strong>

The first thing I would recommend is to verify the current configuration to be familiar with this feature. To know how is it configured you should open an elevated command prompt and run the following command:

<code>netsh interface tcp show global</code>

Usually, after running that command, you will see something similar to this:

<code>Querying active state...</code>

<code>TCP Global Parameters
----------------------------------------------
Receive-Side Scaling State : enabled
Chimney Offload State : disabled
<strong>Receive Window Auto-Tuning Level : normal</strong>
Add-On Congestion Control Provider : default
ECN Capability : disabled
RFC 1323 Timestamps : disabled
Initial RTO : 3000
Receive Segment Coalescing State : enabled
Non Sack Rtt Resiliency : disabled
Max SYN Retransmissions : 2
Fast Open : enabled
Fast Open Fallback : enabled
Pacing Profile : off</code>

As you can see, the default status is always normal. But that's not the only state it can have. If we look at the help for the command, we have the following available status:

<code><em><strong>autotuninglevel - One of the following values:</strong></em>
<strong>disabled:</strong> Fix the receive window at its default value.
<strong>highlyrestricted:</strong> Allow the receive window to grow beyond its default value, but do so very conservatively.
<strong>restricted:</strong> Allow the receive window to grow beyond its default value, but limit such growth in some scenarios.
<strong>normal:</strong> Allow the receive window to grow to accommodate almost all scenarios.
<strong>experimental:</strong> Allow the receive window to grow to accommodate extreme scenarios.</code>

These values can be setup using the following command:

<code>netsh interface tcp set global autotuninglevel=&lt;Insert value here&gt;</code>

<em><strong>Awesome, but how can we confirm that is actually working?</strong></em>

As usual, the best way to confirm something in Networking is actually working is by taking network captures. To begin with the network captures, we first need to understand how Windows determine the default TCP Receive Window size, which will be the base for our AutoTuningLevel negotiation.
As stated in the book <i><a href="https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&amp;field-keywords=windows+server+2008+tcp+ip+protocols+and+services">Windows Server 2008 TCP/IP Protocols and Services by Joseph Davies</a></i> (Amazing book for anyone that wants to understand better Windows TCP Stack, Thanks for the magic Joseph!), we know that TCP Receive Window size is determined by 2 factors:
<ul>
 	<li>How the application is defined for the TCP Receive Window size (some applications tell the stack the amount of data it should use)</li>
 	<li>If the above is not present, a default size determined by link speed.</li>
</ul>
In the case of the second factor, these are the values explained by Joe:

<em>When Receive Window Auto-Tuning is disabled, the default advertised TCP receive window size is either specified by the application or is automatically determined based on the bit rate of the media as reported by the network adapter, according to the following rules:</em>

<code><em>Below 1 megabits per second (Mbps): 8 kilobytes (KB)
1 Mbps to below 100 Mbps: 17 KB
100 Mbps to below 10 gigabits per second (Gbps): 64 KB
10 Gbps or higher: 128 KB</em></code>

In my case, my Ethernet NIC is 1gbps, so it should match the third item: <em>100mbps to below 10gbps</em>.

Being that said, this is the output for the first packet of the TCP Handshake, with each of the available configurations for the autotuninglevel. 192.169.0.5 is my machine, while 192.169.0.4 is my Linux based NAS I'm trying to connect to:

<em>Restricted:</em>

<code>Frame: Number = 3, Captured Frame Length = 66, MediaType = ETHERNET
+ Ethernet: Etype = Internet IP (IPv4),DestinationAddress:[D8-FE-E3-65-F3-FD],SourceAddress:[C8-5B-76-7D-FA-7F]
+ Ipv4: Src = 192.169.0.5, Dest = 192.169.0.4, Next Protocol = TCP, Packet ID = 2319, Total IP Length = 52
- Tcp: [Bad CheckSum]Flags=......S., SrcPort=60890, DstPort=Microsoft-DS(445), PayloadLen=0, Seq=1966088568, Ack=0, Win=64240 ( Negotiating scale factor 0x4 ) = 64240
SrcPort: 60890
DstPort: Microsoft-DS(445)
SequenceNumber: 1966088568 (0x75302178)
AcknowledgementNumber: 0 (0x0)
+ DataOffset: 128 (0x80)
+ Flags: ......S. ---------------------------------------------------------&gt; SYN Flag set
<strong>Window: 64240 ( Negotiating scale factor 0x4 ) = 64240 ---------&gt; TCP Receive Window set as 64K as per my Link bitrate. Note it shows the 0x4 Scale Factor.</strong>
Checksum: 0x8182, Bad
UrgentPointer: 0 (0x0)
- TCPOptions:
+ MaxSegmentSize: 1
+ NoOption:
<strong>+ WindowsScaleFactor: ShiftCount: 4 -------------------------------&gt; Scale factor, defined by AutoTuningLevel.</strong>
+ NoOption:
+ NoOption:
+ SACKPermitted:</code>

<em>Highly Restricted:</em>

<code>Frame: Number = 115, Captured Frame Length = 66, MediaType = ETHERNET
+ Ethernet: Etype = Internet IP (IPv4),DestinationAddress:[D8-FE-E3-65-F3-FD],SourceAddress:[C8-5B-76-7D-FA-7F]
+ Ipv4: Src = 192.169.0.5, Dest = 192.169.0.4, Next Protocol = TCP, Packet ID = 2388, Total IP Length = 52
- Tcp: [Bad CheckSum]Flags=......S., SrcPort=60903, DstPort=Microsoft-DS(445), PayloadLen=0, Seq=1463725706, Ack=0, Win=64240 ( Negotiating scale factor 0x2 ) = 64240
SrcPort: 60903
DstPort: Microsoft-DS(445)
SequenceNumber: 1463725706 (0x573EAE8A)
AcknowledgementNumber: 0 (0x0)
+ DataOffset: 128 (0x80)
+ Flags: ......S. ---------------------------------------------------------&gt; SYN Flag set
<strong>Window: 64240 ( Negotiating scale factor 0x2 ) = 64240 ---------&gt; TCP Receive Window set as 64K as per my Link bitrate. Note it shows the 0x2 Scale Factor.</strong>
Checksum: 0x8182, Bad
UrgentPointer: 0 (0x0)
- TCPOptions:
+ MaxSegmentSize: 1
+ NoOption:
<strong>+ WindowsScaleFactor: ShiftCount: 2 ------------------------------&gt; Scale factor, defined by AutoTuningLevel</strong>
+ NoOption:
+ NoOption:
+ SACKPermitted:</code>

<em>Experimental</em>

<code>Frame: Number = 238, Captured Frame Length = 66, MediaType = ETHERNET
+ Ethernet: Etype = Internet IP (IPv4),DestinationAddress:[D8-FE-E3-65-F3-FD],SourceAddress:[C8-5B-76-7D-FA-7F]
+ Ipv4: Src = 192.169.0.5, Dest = 192.169.0.4, Next Protocol = TCP, Packet ID = 2490, Total IP Length = 52
- Tcp: [Bad CheckSum]Flags=......S., SrcPort=60933, DstPort=Microsoft-DS(445), PayloadLen=0, Seq=2095111365, Ack=0, Win=64240 ( Negotiating scale factor 0xe ) = 64240
SrcPort: 60933
DstPort: Microsoft-DS(445)
SequenceNumber: 2095111365 (0x7CE0DCC5)
AcknowledgementNumber: 0 (0x0)
+ DataOffset: 128 (0x80)
+ Flags: ......S. ---------------------------------------------------------&gt; SYN Flag set
<strong>Window: 64240 ( Negotiating scale factor 0xe ) = 64240 ---------&gt; TCP Receive Window set as 64K as per my Link bitrate. Note it shows the 0xe Scale Factor.</strong>
Checksum: 0x8182, Bad
UrgentPointer: 0 (0x0)
- TCPOptions:
+ MaxSegmentSize: 1
+ NoOption:
<strong>+ WindowsScaleFactor: ShiftCount: 14 -----------------------------&gt; Scale factor, defined by AutoTuningLevel</strong>
+ NoOption:
+ NoOption:
+ SACKPermitted:</code>

<em>Disabled</em>

<code>Frame: Number = 353, Captured Frame Length = 62, MediaType = ETHERNET
+ Ethernet: Etype = Internet IP (IPv4),DestinationAddress:[D8-FE-E3-65-F3-FD],SourceAddress:[C8-5B-76-7D-FA-7F]
+ Ipv4: Src = 192.169.0.5, Dest = 192.169.0.4, Next Protocol = TCP, Packet ID = 2576, Total IP Length = 48
- Tcp: [Bad CheckSum]Flags=......S., SrcPort=60956, DstPort=Microsoft-DS(445), PayloadLen=0, Seq=2315885330, Ack=0, Win=64240 ( ) = 64240
SrcPort: 60956
DstPort: Microsoft-DS(445)
SequenceNumber: 2315885330 (0x8A099B12)
AcknowledgementNumber: 0 (0x0)
+ DataOffset: 112 (0x70)
+ Flags: ......S. ---------------------------------------------------------&gt; SYN Flag set
<strong>Window: 64240 ( ) = 64240 ----------------------------------------&gt; TCP Receive Window set as 64K as per my Link bitrate. Note there is no Scale Factor defined. In this case, Scale factor is not being sent as a TCP Option, so it will not be used by Windows.</strong>
Checksum: 0x817E, Bad
UrgentPointer: 0 (0x0)
- TCPOptions:
+ MaxSegmentSize: 1
+ NoOption:
+ NoOption:
+ SACKPermitted:</code>

<em>Normal (Default state)</em>

<code>Frame: Number = 492, Captured Frame Length = 66, MediaType = ETHERNET
+ Ethernet: Etype = Internet IP (IPv4),DestinationAddress:[D8-FE-E3-65-F3-FD],SourceAddress:[C8-5B-76-7D-FA-7F]
+ Ipv4: Src = 192.169.0.5, Dest = 192.169.0.4, Next Protocol = TCP, Packet ID = 2667, Total IP Length = 52
- Tcp: [Bad CheckSum]Flags=......S., SrcPort=60975, DstPort=Microsoft-DS(445), PayloadLen=0, Seq=4075590425, Ack=0, Win=64240 ( Negotiating scale factor 0x8 ) = 64240
SrcPort: 60975
DstPort: Microsoft-DS(445)
SequenceNumber: 4075590425 (0xF2EC9319)
AcknowledgementNumber: 0 (0x0)
+ DataOffset: 128 (0x80)
+ Flags: ......S. ---------------------------------------------------------&gt; SYN Flag set
<strong>Window: 64240 ( Negotiating scale factor 0x8 ) = 64240 ---------&gt; TCP Receive Window set as 64K as per my Link bitrate. Note it shows the 0x8 Scale Factor.</strong>
Checksum: 0x8182, Bad
UrgentPointer: 0 (0x0)
- TCPOptions:
+ MaxSegmentSize: 1
+ NoOption:
<strong>+ WindowsScaleFactor: ShiftCount: 8 -----------------------------&gt; Scale factor, defined by AutoTuningLevel</strong>
+ NoOption:
+ NoOption:
+ SACKPermitted:</code>

So, as summary, the different states for AutoTuningLevel are as follows:

<code><strong>Normal (Default):</strong> 0x8 (Scale Factor of 8)
<strong>Restricted:</strong> 0x4 (Scale Factor of 4)
<strong>Highly Restricted:</strong> 0x2 (Scale Factor of 2)
<strong>Disable:</strong> No scale factor available
<strong>Experimental:</strong> 0xE (Scale Factor of 14)</code>

<strong><em>Thanks a lot for this explanation, but I still have issues with the communication over my WAN link, what can I do?</em><strong></strong></strong>

In that case, it's possible you are behind a networking device that is not compliant with TCP Window Scale Option defined on <a href="https://tools.ietf.org/html/rfc1323">RFC 1323</a>, and thus it doesn't support the Scale Factor.
In such cases, we encourage you to check the following <a href="https://support.microsoft.com/en-us/help/934430/network-connectivity-fails-when-you-try-to-use-windows-vista-behind-a">KB</a> or contact the support team of your networking device's vendor.

That's all for today, hope you enjoyed the note and helped you get a better understanding on how Windows works!

If you still have further questions about this, please leave your comment and I will get back to you as soon as I can.

Have a great day everyone!

Dante]]></content:encoded>
    </item>
    <item>
      <title>Use AzureRMAppGWCert to list certificate details of Azure App Gateway</title>
      <link>https://docs.microsoft.com/archive/blogs/netgeeks/use-azurermappgwcert-to-list-certificate-details-of-azure-app-gateway</link>
      <pubDate>Thu, 22 Feb 2018 09:46:14 GMT</pubDate>
      <dc:creator><![CDATA[Daniel Mauser - [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/netgeeks/?p=916</guid>
      <description><![CDATA[Authors: Daniel Mauser and Victor Santana
Introduction
Here is Daniel again and it's been a while...]]></description>
      <content:encoded><![CDATA[Authors: <a href="https://www.linkedin.com/in/damauser/">Daniel Mauser</a> and <a href="https://www.linkedin.com/in/victor-santana-6482227/">Victor Santana</a>
<h4><strong>Introduction</strong></h4>
Here is Daniel again and it's been a while I don't publish a blog here. The main reason for my absence is I moved my to a new role as Support Escalation Engineer in Microsoft Support called <a href="https://azure.microsoft.com/en-us/support/plans/response/">Azure Rapid Response</a> or ARR. I've been working in few Azure Networking cases and today I would like to present a new module worked by ARR  team to make possible to list and visualize certificates imported in Azure Application Gateway (AppGW).
<h4><strong>Quick overview about Application Getaway certificates.</strong></h4>
There are two types of certificates that can be used by Application Gateway.
<ul>
 	<li><strong>HTTP Listener certificate</strong> - This is PFX certificate you import to have your TLS/SSL connection to Application Gateway. This certificate includes private key of the certificated (basically the same kind of certificate you use on your web server).</li>
 	<li><strong>Backend Certificates</strong> - This is the certificate which contains public key and you use .CER format to upload the certificate which Application Gateway needs to reach the backend.
More information about AppGW certificates see: <a href="https://docs.microsoft.com/en-us/azure/application-gateway/application-gateway-ssl-portal">Create an application gateway with SSL termination</a></li>
</ul>
<h4><strong>Why we created this PowerShell Module?</strong></h4>
The main reason we created is there's no way at this time to list in printable format, either via Portal or PowerShell, certificate information once imported to Application Gateway.  We've seen couple customer creating support incident cases where they were unable to determine which certificate has been correctly uploaded to Application Gateway. Here is an example inside Listeners blade:

<img src="https://msdnshared.blob.core.windows.net/media/2018/02/Example-AppGW1.png" alt="" width="574" height="463" class="alignnone wp-image-975" />

<strong>*Note:</strong> PowerShell AzureRM command <a href="https://docs.microsoft.com/en-us/powershell/module/azurerm.network/get-azurermapplicationgateway">Get-AzureRmApplicationGateway</a> lists all configuration and certificate information is encoded as base64.
<h4><strong>How this module works?</strong></h4>
This module incorporates an application function to convert base64 format in certificate printable format by using: <em>[System.Security.Cryptography.X509Certificates.X509Certificate2]([System.Convert]::FromBase64String.</em>

See: <span><a href="https://msdn.microsoft.com/en-us/library/system.security.cryptography.x509certificates.x509certificate2(v=vs.110).aspx">X509Certificate2 Class</a> </span>for more information.

<strong>*Note1:</strong> Keep in mind this is PowerShell Module that is not officially support by Microsoft.

<strong>*Note2:</strong> This module may be incorporated in future releases of official AzureRM and while is not there yet you can leverage this module. Once that happens we will update this blog post to let you know.
<h4><strong>How to use AzureRMAppGWCert module?</strong></h4>
AzureRMAppGWCert module has been published in PSGallery and ready available to you and customers. See output example and other details below (extracted from <a href="https://github.com/Welasco/AzureRMAppGWCert">GitHub</a>):

AzureRMAppGWCert
Powershell Module to list all certificates from an Azure Application Gateway.
<h5><span style="text-decoration: underline"><b>Prerequisite</b></span></h5>
This module requires you have AzureRM installed. Please refer to the following instruction before you proceed: <a href="https://docs.microsoft.com/en-us/powershell/azure/install-azurerm-ps">Install and configure Azure PowerShell</a>.
<h5><span style="text-decoration: underline"><strong>How to Install</strong></span></h5>
This Module is Published at https://www.powershellgallery.com/packages/AzureRMAppGWCert
In order to install just open the powershell as Administrator and type:
<strong>Install-Module AzureRMAppGWCert</strong>
<strong>Import-Module AzureRMAppGWCert</strong>
<h5><span style="text-decoration: underline"><strong>Example: Listing all digital certificates associated with a single Application Gateway:</strong></span></h5>
This Module will list all certificates associated with Application Gateway and generate an output like this:
PS C:\&gt; <strong>Get-AzureRMAppGWCert -RG OfficeClient -AppGWName AppGateway</strong>
<pre> AppGWName : AppGateway
 ListnerName : appGatewayHttpListener
 Subject : CN=*.hepoca.com, O=Hepoca Armarios e Servicos Ltda - EPP, L=Taguatinga, S=Distrito Federal, C=BR
 Issuer : CN=******
 SerialNumber : ...
 Thumbprint : ...
 NotBefore : 3/13/2017 7:00:00 PM
 NotAfter : 5/2/2018 7:00:00 AM

 AppGWName : AppGateway
 ListnerName : HTTPs8080
 Subject : CN=*.hepoca.com, O=Hepoca Armarios e Servicos Ltda - EPP, L=Taguatinga, S=Distrito Federal, C=BR
 Issuer : CN=******
 SerialNumber : ...
 Thumbprint : ...
 NotBefore : 3/13/2017 7:00:00 PM
 NotAfter : 5/2/2018 7:00:00 AM

 AppGWName : AppGateway
 HTTPSetting : appGatewayBackendHttpSettings
 RuleName : rule1
 BackendCertName : webjson-pub
 Subject : E=a@a.com, CN=webjson.arr.local, OU=Arr, O=ARR, L=Irving, S=TX, C=US
 Issuer : E=a@a.com, CN=webjson.arr.local, OU=Arr, O=ARR, L=Irving, S=TX, C=US
 SerialNumber : 00B1722AB4D0FB8CAA
 Thumbprint : 573C70769A40CF4D01769926A212009598462436
 NotBefore : 11/28/2017 12:45:23 PM
 NotAfter : 11/28/2018 12:45:23 PM</pre>
<h5><span style="text-decoration: underline"><strong>Pratical Examples:</strong></span></h5>
<ol>
 	<li>This Example will get all Azure Application Gateways and list all certificates associated with all of them:
Get-AzureRMAppGWCert</li>
 	<li>Listing Application Gateway Certificates in a Resource Group:
Get-AzureRMAppGWCert -RG &lt;Resource Group Name&gt;</li>
 	<li>This Example will list all certificates associated with a specific Application Gateway:
Get-AzureRMAppGWCert -RG &lt;Resource Group Name&gt; -AppGWName &lt;Application Gateway Name&gt;</li>
 	<li>Listing all Application Gateway Certificates and exports all of them to certificate .cer format.
Get-AzureRMAppGWCert -Export</li>
 	<li>Listing all Application Gateway Certificates and show all details (all certificate attributes).
Get-AzureRMAppGWCert -Details</li>
</ol>
<h4>Demo</h4>
<img src="https://msdnshared.blob.core.windows.net/media/2018/02/AppGWCert2.gif" alt="" width="730" height="643" class="alignnone wp-image-955" />
<h4><strong>Conclusion</strong></h4>
In this article we described a new <strong>AzureRMAppGWCert</strong> Powershell module that can be used to list digital certificates used in your Azure Application Gateway. We hope this module is useful and help you better to manager digital certificates on Azure Application Gateway.]]></content:encoded>
    </item>
    <item>
      <title>Why do I get an Internet Explorer or Edge popup open when I get connected to my corpnet or a public network?</title>
      <link>https://docs.microsoft.com/archive/blogs/netgeeks/why-do-i-get-an-internet-explorer-or-edge-popup-open-when-i-get-connected-to-my-corpnet-or-a-public-network</link>
      <pubDate>Tue, 20 Feb 2018 11:10:54 GMT</pubDate>
      <dc:creator><![CDATA[Dante Stancato]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/netgeeks/?p=935</guid>
      <description><![CDATA[Hello everyone! 

Today I will explain a behavior causing your machine to suddenly open a pop-up...]]></description>
      <content:encoded><![CDATA[<span lang="EN-US">Hello everyone! </span>

<span lang="EN-US">Today I will explain a behavior causing your machine to suddenly open a pop-up window of IE or Edge showing (usually) the MSN portal after the boot (or a network change). Yeah, it’s expected and is not a virus.</span>

<span lang="EN-US"><span lang="EN-US">As you may all know (and if you don’t, please look at <a href="https://blogs.technet.microsoft.com/networking/2012/12/20/the-network-connection-status-icon/">this note</a>), Windows has an internal component for network connectivity changes detection called “Network Connectivity Status Indicator” (or NCSI as it’s called by his friends). This component, among other tasks, performs a background testing to determine if the machine has Internet connectivity, engages his brother, the Network Location Awareness (or NLA), to identify if it’s in a domain or a public network to define the proper firewall profile, etc.</span></span>
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">As a summary, the NCSI, while detecting the internet connectivity, attempts to download a text file from either of the following addresses:</span></p>

<ul>
 	<li class="MsoNormal"><span lang="EN-US">Windows 8.1 and earlier versions: <a href="https://www.msftncsi.com/ncsi.txt"></a></span><span lang="EN-US"><a href="https://www.msftncsi.com/ncsi.txt">https://www.msftncsi.com/ncsi.txt</a></span></li>
 	<li class="MsoNormal"><span lang="EN-US">Windows 10 and above: <a href="https://www.msftconnecttest.com/connecttest.txt">https://www.msftconnecttest.com/connecttest.txt</a></span></li>
</ul>
<p class="MsoNormal"><span lang="EN-US">This, of course involves the following operations:</span></p>

<ul>
 	<li class="MsoNormal"><span lang="EN-US">DNS query and response for either of the FQDN.</span></li>
 	<li class="MsoNormal"><span lang="EN-US"><span lang="EN-US">HTTP operations to contact the website.</span></span></li>
 	<li class="MsoNormal"><span lang="EN-US"><span lang="EN-US"><span lang="EN-US">HTTP operations to determine those addresses contain the following Text content (without the quotes):<span lang="EN-US" style="font-family: 'Courier New'"><span style="font: 7.0pt 'Times New Roman'"> </span></span></span></span></span>
<ul>
 	<li class="MsoNormal"><span lang="EN-US"><span lang="EN-US"><span lang="EN-US"><span lang="EN-US">Windows 8.1 and earlier: “Microsoft NCSI” </span></span></span></span></li>
 	<li class="MsoNormal"><span lang="EN-US"><span lang="EN-US"><span lang="EN-US"><span lang="EN-US"><span lang="EN-US">Windows 10 and above: “Microsoft Connect Test”</span></span></span></span></span></li>
</ul>
</li>
</ul>
<p class="MsoNormal"><span lang="EN-US">As this is doing a simple HTTP GET operation over a plain text file hosted in a plain HTTP server, there is no information exchanged during the communication, so there is no cookies or other tracking components that may make you think it will get some of your personal information involved. The only information exchanged is a minimal download of the text file content from the server to your machine. Privacy is our key goal as a company.</span></p>
<p class="MsoNormal"><i><span lang="EN-US">So, what is the relationship of that procedure with the annoying IE or Edge pop-up?</span></i><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">Well, in certain scenarios, the NCSI cannot contact directly the NCSI website due to infrastructure limitations. For that reason, NCSI also has some passive probe processes (described in detail in the note I quoted before) in which it can identify if the machine has internet access due to the network usage. All of this is performed internally within Windows without getting any information outside of your machine. Again, we do care about your privacy.</span></p>
<p class="MsoNormal"><span lang="EN-US">This annoying-pop-up behavior is usually experienced in Windows 8 and higher. You may wonder why, and this is the explanation: Consider you’re at home checking your flight details before going to the airport. Your local network has no proxy nor Firewall limiting your internet connectivity. Your machine will perform the NCSI procedure without issues and will show you have Internet connectivity. It’s time to go to the airport, so you take a cab and get to that place. Your body is asking you for some caffeine, so you get to a Star-related coffee shop for a cup of coffee and want to check your social profiles while getting the caffeine inside your mouth. You connect to a public Wi-Fi hotspot from that place, which has a limitation of some sort of easy login. When you power up your machine, you will notice a Yellow Bang mark in your NIC and a “No internet” connectivity message when you hover over the NIC with the Mouse. In Windows 7 (and probably 8-8.1) you may see (usually if you pay much attention, because it vanishes quite quickly by design) a message stating that you need further actions to fully connect. If you didn’t see that message, you will have no internet until you open a browser and complete the requirements from that Wi-Fi hotspot to login. After that, you can start browsing the internet normally and, after a couple of seconds of browsing, you notice the Yellow bang mark magically is gone. What happened? The NCSI passive probe process.</span></p>
<p class="MsoNormal"><span lang="EN-US">Now, in recent versions, to make the user experience more comfortable for the normal user, when the machine detects some sort of login, it will immediately open the browser, so you can easily see the login requirements without opening the browser manually. That’s very cool, right?</span></p>
<p class="MsoNormal"><i><span lang="EN-US">OK, but I’m at my company’s network and we have no Wi-Fi hotspots in place, why is it still triggering the annoying-pop-up behavior?</span></i></p>
<p class="MsoNormal"><span lang="EN-US"> Well, this usually happens when you have a proxy in place, and Windows is not allowed to contact the NCSI website directly. In such cases, the proxy will be contacted in the background and, usually, the proxy will require authentication, and after it gets authenticated, it will send you to <a href="https://www.msftconnecttest.com/redirect">https://www.msftconnecttest.com/redirect</a>. This URI will redirect you to the MSN Portal. It’s a hotspot-like behavior.</span></p>
<p class="MsoNormal"><i><span lang="EN-US">Thanks for the clarification, but how do we stop that from happening? That’s really annoying!</span></i><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">To answer that, I will quote the note I mentioned at the beginning of this blog entry:</span></p>
<p class="MsoNormal"><i><span lang="EN-US">“We have also seen an issue where 3<sup>rd</sup> party Firewalls/Anti-Virus blocked the URL </span></i><span lang="EN-US"><a href="https://www.msftncsi.com/ncsi.txt"><i></i></a></span><span lang="EN-US"><a href="https://www.msftncsi.com/ncsi.txt"><i>https://www.msftncsi.com/ncsi.txt</i></a> <i>resulting in a limited access status in the taskbar, even though there is
Internet Connectivity. Adding “*.msftncsi.com” to the list of trusted URLs should resolve the issue.”</i></span></p>
<p class="MsoNormal"><span lang="EN-US">Being that said, the only way to prevent the proxy from coming into action in the NCSI process, and avoiding the passive probe process (and therefore the annoying-pop-up behavior) is to whitelist the 2 addresses directly on your firewall over port 80 only:</span></p>

<ul>
 	<li class="MsoNormal"><span lang="EN-US"><span style="font: 7.0pt 'Times New Roman'"> </span></span><span lang="EN-US">*.msftncsi.com</span></li>
 	<li class="MsoNormal"><span lang="EN-US"><span lang="EN-US"><span style="font: 7.0pt 'Times New Roman'"> </span></span><span lang="EN-US">*.msftconnecttest.com</span></span></li>
</ul>
<p class="MsoNormal"><span lang="EN-US"> </span><span lang="EN-US">For now, that’s all, hope this helps you understand why you’re experiencing this and also helps you save lots of time of troubleshooting!</span></p>
<p class="MsoNormal"><span lang="EN-US">See you next entry!
</span></p>

</div>]]></content:encoded>
    </item>
    <item>
      <title>The NLB Deployment Reference – All you need to know to implement and deploy Microsoft Network Load Balancing</title>
      <link>https://docs.microsoft.com/archive/blogs/netgeeks/the-nlb-deployment-reference-all-you-need-to-know-to-implement-and-deploy-microsoft-network-load-balancing</link>
      <pubDate>Thu, 13 Jul 2017 14:29:12 GMT</pubDate>
      <dc:creator><![CDATA[Dante Stancato]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/netgeeks/?p=905</guid>
      <description><![CDATA[Hello everyone! Dante again, this time with some good stuff related to NLB. Based in our experience,...]]></description>
      <content:encoded><![CDATA[<span lang="EN-US">Hello everyone! Dante again, this time with some good stuff related to NLB. Based in our experience, we could identify that the most common issue with NLB is that people is not informed enough about the technology, therefore the deployments and implementations usually lack some mandatory settings, or don’t get into consideration the most important factor in every network: the bandwidth consumption.</span>
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">In this blog note I will try to summarize every important aspect to be considered at the deployment time, and also will share with you some third-party documentation that will help you troubleshoot the most common NLB-related problem scenarios in our support life.</span></p>
<p class="MsoNormal"><span lang="EN-US">If you would like to know how NLB works, I would recommend to use the following <a href="https://blogs.technet.microsoft.com/networking/2008/12/09/balancing-act-what-you-really-ought-to-know-about-windows-server-nlb/">blog note</a> which covers almost all the basics. I will not touch those topics (well, maybe some of them), so please ensure you get them ready in your head to better understand what I’ll talk about </span><span lang="EN-US" style="font-family: 'Segoe UI Emoji',sans-serif">😊</span><span lang="EN-US"> </span></p>
<p class="MsoNormal"><b><span lang="EN-US">What is the best configuration method for NLB?</span></b></p>
<p class="MsoNormal"><span lang="EN-US">As you all may know, NLB has 3 modes to be configured: Unicast, Multicast and Multicast with IGMP. The real answer for that question is: <b>it depends</b>. All three modes work very well if they are properly configured, but they can cause you a real headache if they are not.</span></p>
<p class="MsoNormal"><span lang="EN-US">From a NLB standpoint, the configuration is straightforward: install the role, open the console, create a new cluster, select the nodes, the NLB method, the ports and affinity and that’s all. </span></p>
<p class="MsoNormal"><span lang="EN-US">You have also some tools to prepare yourself for each method, basically on the MAC Addressing of each of them. The most important tool for this is NLB IP2MAC. This tool is available on any machine with NLB installed, and is very easy to be used. Just type the command with the desired IP Address to be used as Virtual IP address and you will get the list of possible MAC Addresses for each method. The command is as follows:</span></p>
<p class="MsoNormal"><i><span lang="EN-US">NLB IP2MAC &lt;VIP of NLB&gt;</span></i></p>
<p class="MsoNormal"><img width="465" height="200" class="alignnone wp-image-915" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/07/NLBIP2MAC-300x129.png" /></p>
<p class="MsoNormal"><span lang="EN-US">As noted in the screenshot, we can get the MAC Address for each mode easily with this command. You can do your math also, considering the following:</span></p>
<p class="MsoNormal"><span lang="EN-US">1-<span style="font: 7.0pt 'Times New Roman'">  </span></span><span lang="EN-US">Unicast MAC will always start with 02-BF identifying the Unicast MAC of NLB, and then the IP address converted, by octet, to Hexadecimal. </span></p>
<p class="MsoNormal"><span lang="EN-US">2- </span><span lang="EN-US">Multicast MAC will always start with 03-BF as the Multicast MAC of NLB, and then, again, the IP address converted, by octet, to Hexadecimal.</span></p>
<p class="MsoNormal"><span lang="EN-US">3-<span style="font: 7.0pt 'Times New Roman'">  </span></span><span lang="EN-US">IGMP Multicast MAC is different than the other ones. It will always have 01-00-5E-7F as MAC identifier for NLB IGMP Multicast, and the last 2 parts are the last 2 octets of the IP address.</span></p>
<p class="MsoNormal"><span lang="EN-US">Now the problem comes when you choose a NLB method but your network infrastructures is not prepared for that. Let’s explain each method.</span></p>
<p class="MsoNormal"><b><span lang="EN-US">Unicast</span></b></p>
<p class="MsoNormal"><span lang="EN-US">Unicast is the easier way to configure the NLB. Why? Because you don’t need to do anything else in your network infrastructure… In theory. As Unicast mode replaces the original hardware MAC address for a NLB Unicast MAC in each node of the cluster, physical Switches will get crazy and start sending the NLB traffic to all its switch ports, to ensure the traffic is sent to the correct nodes.</span></p>
<p class="MsoNormal"><span lang="EN-US">In some cases, you would like to have 2 NICs on your server. If you are running Windows 2008 or higher you should consider this other <a href="https://blogs.technet.microsoft.com/networking/2008/11/20/balancing-act-dual-nic-configuration-with-windows-server-2008-nlb-clusters/">blog note</a> to ensure the traffic gets routed properly with this configuration.</span></p>
<p class="MsoNormal"><span lang="EN-US">Each NLB Heartbeat packet contains about 1500 bytes of data (only the heartbeats!). By default, the nodes send heartbeat packets each second and wait for 5 of those packets to be received until it considers the node as converged. And that’s per node. You need to increase that number by the number of nodes you have in place. Pretty much data huh?</span></p>
<p class="MsoNormal"><span lang="EN-US">Now imagine what would happen if you have a 24 or 48 ports Switch in which you have only 2 NLB nodes connected. Since the Unicast mode replaces the MAC of both nodes, for the switch both servers will have the same MAC, and it will not be able to update the MAC Address table properly, causing what is called a <a href="https://en.wikipedia.org/wiki/Unicast_flood">Unicast Flood</a>. So, you have now the traffic coming to the NLB from the clients AND the NLB heartbeat traffic being sent to all the switch ports. What a mess, right?</span></p>
<p class="MsoNormal"><span lang="EN-US">To avoid this, you have 2 options: First is to get a HUB. Yes, a HUB, I’m not kidding. I know it may be hard to get one nowadays, but this is the best way to isolate the traffic. Connecting the HUB to the switch, the Switch will learn the NLB Unicast MAC (which is 02-BF-XX-XX-XX-XX) only in the port the HUB is connected, and the HUB will replicate the traffic to the nodes (because that’s what a HUB is intended for, right?). So, the flooding is being made by the HUB and the other servers on the switch get NLB-Traffic-Free. The second option is to create a separate VLAN for the NLB Servers, but ensuring this VLAN is reachable from other subnets. This way you will keep the traffic isolated only to the Switch ports assigned to that VLAN, and not bothering the rest of the servers on it, reducing congestion.</span></p>
<p class="MsoNormal"><span lang="EN-US">Ok, but what happens if we have a virtual environment? Usually the virtual switches in Virtual Environments prevent the Unicast Flooding by default (which makes totally sense), so you will need to do some extra settings on your Virtual Environment to get it compliant with Unicast.</span></p>
<p class="MsoNormal"><span lang="EN-US">If you’re using the best virtual environment ever (Hyper-V, of course) you have it easy: Go to the Hyper-V console, machine settings, select the NIC settings and enable the checkbox for <a href="https://technet.microsoft.com/en-us/library/ff458341.aspx">“Enable Spoofing Of MAC Addresses”</a>. Click OK and you’re done.</span></p>
<p class="MsoNormal"><span lang="EN-US">Now, for VMWare, it’s a little bit more complex, but luckily we have the following <a href="https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1556">VMWare note</a> which explains how to resolve that from their side. Remember to contact them if you have questions with their documentation.</span></p>
<p class="MsoNormal"><span lang="EN-US">In case you have other virtual environments (like XenServer, VirtualBox, or any other) and are experiencing similar issues, go ahead and contact them for guidance, they should be able to help you. Of course, you can contact us also, we will help you identify where to go next for sure.</span></p>
<p class="MsoNormal"><b><span lang="EN-US">Multicast</span></b></p>
<p class="MsoNormal"><span lang="EN-US">This mode is my preferred one. It’s kind of tricky, but when you get to understand it you’ll realize it’s the best way. Be warned that your networking team will hate you because you will make them work and will try to convince you to not configure this mode, but stay strong, it worth it. </span></p>
<p class="MsoNormal"><span lang="EN-US">Multicast mode is different than Unicast but similar at the same time. The main difference is that the Switch may drop the packets or flooding them if it doesn’t know where to send them. But with
Multicast </span><span lang="EN-US">we have more efficient ways to avoid this. Let’s see how.</span></p>
<p class="MsoNormal"><span lang="EN-US">When you configure the Multicast mode on NLB, you will not get the Hardware MAC address changed on servers, so you will be able to access them through the same NIC all the time, but it configures the NLB VIP to a NLB Multicast MAC Address instead. This MAC has the format of 03-BF-XX-XX-XX-XX. If you do an IPCONFIG /all you will not find it in the network adapters. Since the MAC is not directly attached to the NICs, the switch cannot learn this MAC, but all the traffic going to the NLB Virtual IP address (VIP) will have this MAC as destination. Because the Switch cannot learn this NLB Multicast MAC directly, it will drop the packets (or flood all ports in the same way as Unicast), and the clients will have issues to reach the NLB nodes, as well you will experience Convergence issues. I’ve seen a mix of both things happening several times. </span></p>
<p class="MsoNormal"><span lang="EN-US">This behavior usually cause confusion, because at the beginning of the configuration it almost always starts working “without issues”, but after some time configured, you will notice the nodes go down in the console, or start experiencing application issues while going through the VIP of the NLB. All of these are symptoms of packet drops due to the lack of network compliance for NLB Multicast.</span></p>
<p class="MsoNormal"><span lang="EN-US">To avoid this, Microsoft has a mandatory requirement (yes, I used the mandatory word) to have this mode in place. That requirement is the addition of a Static ARP entry and a Static MAC address table entry on your network infrastructure. And that’s where your network team will complain.</span></p>
<p class="MsoNormal"><span lang="EN-US">Again, from NLB side it’s very straightforward: Install the role, open the NLB console, create a new cluster, select the nodes, the NLB method, the ports and affinity and that’s all. That’s all you need to do from Windows side, nothing else is required to have NLB in place in each NLB cluster. But in the case of Multicast and Multicast with IGMP, you need to manually “teach” the switches (and routers) where the NLB nodes are.</span></p>
<p class="MsoNormal"><span lang="EN-US"> The following notes explain clearly what you need to do to get this properly configured based on your network infrastructure vendor. Bear in mind that we don’t maintain these notes so they may have inaccurate information, please contact each vendor in case of any doubts, our intention is to help you get the most complete list of notes for your information in a single place, but we are not accountable of what’s included on them.</span></p>
<p class="MsoNormal"><span lang="EN-US">VMWare:</span></p>
<p class="MsoNormal"><span lang="EN-US"><a href="https://kb.vmware.com/selfservice/search.do?cmd=displayKC&amp;docType=kc&amp;docTypeID=DT_KB_1_1&amp;externalId=1006525">Sample Configuration - Network Load Balancing (NLB) Multicast mode over routed subnet - Cisco Switch Static ARP Configuration (1006525)</a></span></p>
<p class="MsoNormal"><span lang="EN-US">Cisco:</span></p>
<p class="MsoNormal"><span lang="EN-US"><a href="https://www.cisco.com/c/en/us/support/docs/switches/catalyst-6500-series-switches/107995-configure-nlb-00.html">Catalyst Switches for Microsoft Network Load Balancing Configuration Example</a></span></p>
Note: If using VSS on Cisco Catalyst, you may experience issues with traffic on one of the stack's nodes. For further information contact Cisco mentioning <a href="https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvd69060">this bug.</a>
<p class="MsoNormal"><span lang="EN-US"><a href="https://www.cisco.com/c/en/us/support/docs/ip/multicast/116150-configure-Nexus7000-00.html">Microsoft Network Load Balancing on Nexus 7000 Configuration Example</a></span></p>
<a href="https://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus9000/sw/9-x/multicast/configuration/guide/b_Cisco_Nexus_9000_Series_NX-OS_Multicast_Routing_Configuration_Guide_9x/b_Cisco_Nexus_9000_Series_NX-OS_Multicast_Routing_Configuration_Guide_9x_chapter_01001.pdf">Configuring Microsoft Network Load Balancing (NLB) on Nexus 9000 Series</a>
<p class="MsoNormal"><span lang="EN-US">Juniper:</span></p>
<p class="MsoNormal"><span lang="EN-US"><a href="https://kb.juniper.net/InfoCenter/index?page=content&amp;id=KB14854">EX Series Switches and Microsoft Network Load Balancing (NLB) in multicast mode</a></span></p>
<p class="MsoNormal"><span lang="EN-US"><a href="https://kb.juniper.net/InfoCenter/index?page=content&amp;id=KB30135">[EX/QFX] Example - Workaround for using Microsoft network load balancing on EX4300 and QFX5100 switches</a></span></p>
<p class="MsoNormal"><span lang="EN-US">HPE:</span></p>
<p class="MsoNormal"><span lang="EN-US"><a href="https://h20564.www2.hpe.com/hpsc/doc/public/display?docId=emr_na-c02656362&amp;sp4ts.oid=4177865">HP Switch 5500/5500G - How to implement Microsoft Network Load Balancing using multicasts on the Switch 5500 and 5500G</a></span></p>
<p class="MsoNormal"><span lang="EN-US">Dell:</span></p>
<p class="MsoNormal"><span lang="EN-US"><a href="https://www.dell.com/support/manuals/ar/es/arbsdt1/force10-s4048-on/S4048_ON_9.9.0.0_Config_Pub-v1/Microsoft-Network-Load-Balancing?guid=GUID-A7EAB672-025C-4498-A1A2-6C32CCB9552C&amp;lang=en-us">Dell Configuration Guide for the S4048–ON System 9.9(0.0)</a></span></p>
<p class="MsoNormal"><span lang="EN-US"><a href="https://www.dell.com/support/article/ar/es/arbsdt1/HOW10789/dell-networking-force10-switches-and-microsoft-network-load-balancing?lang=EN">Dell Networking Force10 switches and Microsoft Network Load Balancing</a></span></p>
<p class="MsoNormal"><span lang="EN-US">Huawei:</span></p>
<p class="MsoNormal"><span lang="EN-US"><a href="https://support.huawei.com/ehedex/pages/DOC1000135317AEG0221R/04/DOC1000135317AEG0221R/04/resources/dc/dc_s_ccase_arp_003.html">Example for Connecting a Device to an NLB Cluster (Using Multi-Interface ARP)</a></span></p>
<p class="MsoNormal"><span lang="EN-US">D-Link:</span></p>
<p class="MsoNormal"><span lang="EN-US"><a href="https://dlink-manuals.org/dlink-layer-3-switch-microsoft-nlb-in-multicast-mode-configuration-example-howto/">D-Link Layer 3 Switch Microsoft NLB in Multicast Mode Configuration Example Howto</a></span></p>
<p class="MsoNormal"><span lang="EN-US">Avaya:</span></p>
<p class="MsoNormal"><span lang="EN-US"><a href="https://downloads.avaya.com/css/P8/documents/100123894">Technical Configuration Guide for Microsoft Network Load Balancing</a></span></p>
<p class="MsoNormal"><span lang="EN-US">H3C:</span></p>
<p class="MsoNormal"><span lang="EN-US"><a href="https://www.h3c.com.hk/Technical_Support___Documents/Technical_Documents/Switches/H3C_S12500_Series_Switches/Configuration/Operation_Manual/H3C_S12500_CG-Release7374-6W731/05/201506/872873_1285_0.htm#_Toc420608520">05-Layer 3 - IP Services Configuration Guide</a></span></p>
<p class="MsoNormal"><span lang="EN-US">If you find out that your vendor is not listed here please let us know by a comment so we can try to add it. We are not going to take much care about different models, since usually same vendor share same logic for configuration, but we want you to have at least an idea of how it should look like. If you need assistance for any specific model, please contact your manufacturer.</span></p>
<p class="MsoNormal"><span lang="EN-US">Again, we need to put the disclaimer since we don’t own any of those notes. In case you have any doubts on the content of the above-mentioned notes please contact the respective manufacturer for support or assistance.</span></p>
<p class="MsoNormal"><span lang="EN-US">Finally, to cover the Virtualization part, you may be wondering how would you configure the static MAC Address table for a Virtual Machine. Well, we need to understand first how the Virtual Infrastructure is composed. Usually, in enterprises, you have a cluster of a bunch of servers acting as hypervisors (Hyper-V, VMWare, etc.) which share the same VMs and have High Availability features to move the VMs between them to avoid service disruption. How can we ensure the NLB VMs will receive the correct traffic? Here comes another complain from the Networking team. To ensure the VMs will receive the traffic no matter in which virtual host they are, you need to ensure that all the switch ports connected to all the virtual hosts are assigned to the NLB Multicast MAC on the Static entry for the MAC Address table. So, if you have 8 hosts with 2 NICs each connected to the network, you should have 16 interfaces assigned to the NLB Multicast MAC address in the MAC Address Table of the switches. This way you can do Live Migration (or vMotion in case of VMWare) without worrying to which host the virtual machine will get into.</span></p>
<p class="MsoNormal"><b><span lang="EN-US">Multicast with IGMP</span></b></p>
<p class="MsoNormal"><span lang="EN-US">Finally, we have the last mode for NLB: IGMP Multicast (or Multicast with IGMP). This mode is completely dependent on your network infrastructure, since you need to have IGMP capable switches to get it to work. This mode is basically the same than Multicast, but with an automatic method for NLB Traffic detection, based on IGMP Multicast traffic.</span></p>
<p class="MsoNormal"><span lang="EN-US">When you enable this method, the NLB nodes will start sending IGMP Join messages to the Multicast Address 239.255.XX.XX where the X correspond to the last 2 octets of the Virtual IP of NLB. In our example of the screenshot, for the IP 10.0.0.1, the Multicast Address used for the cluster nodes to send the IGMP traffic would be 239.255.0.1. </span></p>
<p class="MsoNormal"><span lang="EN-US">Did I say you need IGMP capable hardware on your network for this method to work? Yes, because your switch should be capable of snoop the traffic to find the ports which are sending the IGMP traffic to auto configure their MAC Address table accurately and send the traffic to the corresponding ports.</span></p>
<p class="MsoNormal"><span lang="EN-US">Some of the notes listed above in the Multicast section have the correct configuration parameters for their devices, but in case you need confirmation your equipment is capable of this mode, please contact your Hardware vendor for confirmation.</span></p>
<p class="MsoNormal"><b><span lang="EN-US">As summary:</span></b></p>

<ul>
 	<li class="MsoListParagraphCxSpFirst" style="text-indent: -18.0pt"><span lang="EN-US"><span style="font: 7.0pt 'Times New Roman'">          </span></span><span lang="EN-US">Unicast mode is the easiest way to configure NLB in simple environments. You don’t need to do much to maintain the cluster, but be aware that this configuration may cause you network performance issues on other systems due to the traffic flooding.</span></li>
 	<li class="MsoListParagraphCxSpFirst" style="text-indent: -18.0pt"><span lang="EN-US"><span style="font: 7.0pt 'Times New Roman'">          </span></span><span lang="EN-US">Multicast is the best method (in my opinion) because you specifically direct the traffic to the nodes you need and don’t impact nearby servers. The bandwidth is efficiently used and you have a low risk of performance issues as collateral damage for other systems. As a counterpart, needs a lot more of network equipment knowledge and involvement, but good things are not usually free, right?</span></li>
 	<li class="MsoListParagraphCxSpFirst" style="text-indent: -18.0pt"><span lang="EN-US"><span style="font: 7.0pt 'Times New Roman'">         </span></span><span lang="EN-US">Multicast with IGMP is a good choice also if you have capable networking equipment. It has the benefits of the Multicast with the improvement of the auto configuration of the switches if they are IGMP Snooping enabled. The disadvantage part is, again, a potential limitation on the network equipment. Your network infrastructure may not be capable of this IGMP Snooping feature</span><span lang="EN-US">.</span></li>
</ul>
<p class="MsoNormal"><span lang="EN-US">So far, we have reached the end of the blog today, so I hope you enjoyed the explanation and, of course, hope this helps you get your NLB back on track!</span></p>
<p class="MsoNormal">I would like to say a big THANKS to Daniel Mauser, who helped me get this piece of knowledge here for you. We'll miss you in the team Daniel!!</p>
<p class="MsoNormal"><span lang="EN-US">See you next entry!</span></p>

</div>]]></content:encoded>
    </item>
    <item>
      <title>Creating a Site-to-Site VPN (IPSec IKEv2) with Azure and MikroTik (RouterOS)</title>
      <link>https://docs.microsoft.com/archive/blogs/netgeeks/creating-a-site-to-site-vpn-ipsec-ikev2-with-azure-and-mikrotik-routeros</link>
      <pubDate>Tue, 11 Jul 2017 22:06:54 GMT</pubDate>
      <dc:creator><![CDATA[Daniel Mauser - [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/netgeeks/?p=705</guid>
      <description><![CDATA[Authors: Daniel Pires and Daniel Mauser

Introduction
In this article, we are going to show you...]]></description>
      <content:encoded><![CDATA[<span style="font-size: 12pt"><strong>Authors</strong>: <a href="https://twitter.com/DapiElMago">Daniel Pires</a> and <a href="https://twitter.com/DanMauser">Daniel Mauser</a>
</span>
<h3>Introduction</h3>
In this article, we are going to show you how to setup a IPSec Site-to-Site VPN between Azure and On-premises location by using MikroTik Router. Another blog post has been published few years ago about the same subject <a href="https://blogs.technet.microsoft.com/rharper/2012/11/14/creating-a-site-to-site-vpn-with-windows-azure-and-mikrotik-routeros/">Creating a site-to-site VPN with Windows Azure and MikroTik ( RouterOS )</a>. However, we have some major updates in this article. First, we are going to setup Site-to-Site VPN using Azure Resource Manager Portal (https://portal.azure.com), while original article uses Classic Azure Portal. Second, VPN Gateway in this blog post is Route-Based which will leverage IKE version 2 (IKEv2) compared with the Policy-Based Gateway on first article leveraging IKE version 1(IKEv1). If you are not familiar with the terminology of IPSec Parameters, in particular IKEv2, please take a look on the following documentation <a href="https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-about-vpn-devices">About VPN devices and IPsec/IKE parameters for Site-to-Site VPN Gateway connections</a>.
<h3>Scenario</h3>
Below we have a diagram of the scenario covered in this step-by-step.

<img src="https://msdnshared.blob.core.windows.net/media/2017/07/071217_0229_CreatingaIK1.png" alt="" />

Relevant information on the diagram above necessary to configure the Site-to-Site VPN.

<strong>Azure Side:
</strong>
<ul>
 	<li>VNET Subnet: 10.4.0.0/16</li>
 	<li>Public IP of the Azure VPN Gateway: 13.85.83.XX</li>
</ul>
<strong>On-Premises Side:
</strong>
<ul>
 	<li>Subnet: 192.168.88.0/24</li>
 	<li>Public IP of On-Prem Gateway: 47.187.118.YY</li>
</ul>
<h3>Azure: Configuring Route-Based IPSec Site-to-Site VPN</h3>
This section we will go over step-by-step on configuring Site-to-Site VPN on the Azure side. The steps demonstrated here are the same in the official documentation: <a href="https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-site-to-site-resource-manager-portal">Create a Site-to-Site connection in the Azure portal</a>. So, we are not going to cover specific step by step on how to get to the screens, you can use the official documentation as reference. Also, If you are already familiar with those steps feel free to jump right the way on the session below: <strong>MikroTik (On-Premises) Configuring IPSec (IKEv2) Site-to-Site VPN</strong>.

1. Create a virtual network
<p style="margin-left: 18pt"><img src="https://msdnshared.blob.core.windows.net/media/2017/07/071217_0229_CreatingaIK2.png" alt="" /></p>
2. Specify a DNS server (Optional for this and not necessary for this demonstration to work)

3. Create the gateway subnet:

a. Select Gateway Subnet
<p style="margin-left: 36pt"><img src="https://msdnshared.blob.core.windows.net/media/2017/07/071217_0229_CreatingaIK3.png" alt="" /></p>
b. Add Gateway subnet. In this case I will use the final 255 network inside 10.4.0.0/16 to create 32 addresses allocated to VPN Gateways and subnet is: 10.4.255.0.27
<p style="margin-left: 36pt"><img src="https://msdnshared.blob.core.windows.net/media/2017/07/071217_0229_CreatingaIK4.png" alt="" /></p>
4. Create the Virtual Network Gateway. It is important here to highlight we are going to use VPN Type: Route-Based Also for your lab purposes you can use SKU Basic, for production workloads it is recommend at least Standard SKU. More information about VPN Gateway sizes consult: <a href="https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-about-vpn-gateway-settings">Gateway SKUs</a>.
<p style="margin-left: 18pt">a) Creating the Virtual Network Gateway named VNET1GW</p>
<p style="margin-left: 36pt"><img src="https://msdnshared.blob.core.windows.net/media/2017/07/071217_0229_CreatingaIK5.png" alt="" /></p>
<p style="margin-left: 18pt">b) After you create Virtual Network Gateway you can see the status as well as the Public IP that is going to be used:</p>
<p style="margin-left: 18pt"><img src="https://msdnshared.blob.core.windows.net/media/2017/07/071217_0229_CreatingaIK6.png" alt="" /></p>
5. Create the local network gateway which requires you specify Public IP of your VPN Device (47.187.117.YY) as well as the On-premises Subnet(s) (192.168.88.0/24).

<img src="https://msdnshared.blob.core.windows.net/media/2017/07/071217_0229_CreatingaIK7.png" alt="" />

6. Configure your VPN device – See section: <strong>MikroTik (On-Premises) Configuring IPSec (IKEv2) Site-to-Site VPN</strong>.

7. Create the VPN connection
<p style="margin-left: 18pt"><img src="https://msdnshared.blob.core.windows.net/media/2017/07/071217_0229_CreatingaIK8.png" alt="" /></p>
8. Verify the VPN connection

<img src="https://msdnshared.blob.core.windows.net/media/2017/07/071217_0229_CreatingaIK9.png" alt="" />
<h3>MikroTik (On-Premises) Configuring IPSec (IKEv2) Site-to-Site VPN</h3>
MikroTik RouterOS has several models and there are very affordable devices models that you can use also to play and learn how to configure Site-to-Site VPN with Azure.

<em>DISCLAIMER: Although we demonstrate Mikrotik in this article, it is important to mention Microsoft does not support the device configuration directly. In case you have issue, please contact device manufacturer for additional support and configuration instructions.
</em>

One important point to highlight is IKEv2 has been introduced on release 6.38. Therefore, make sure you have a compatible version to be able to proceed with the configuration demonstrated in this article which we used: RouterBOARD 750 and software version: RouterOS 6.39.

In this tutorial <strong>Winbox</strong> management utility has been used to perform MikroTik configuration and here are the necessary steps to configure MikroTik correctly:
<ol>
 	<li>
<div>Add IPSec Policy by Selecting on Menu <strong>IP</strong> and <strong>IPSec </strong>– On Policies tab click <strong>+ (plus) sign</strong> to add a New Policy. On General tab add both subnets (Source: On-Prem and Destination: Azure) as shown:</div>
<img src="https://msdnshared.blob.core.windows.net/media/2017/07/071217_0229_CreatingaIK10.png" alt="" /></li>
 	<li>
<div>On the same screen but <strong>Action</strong> Tab – Select Tunnel and specify On-Prem Source Public IP and Destination Azure Gateway Public IP which can be obtained after you Create Virtual Network Gateway (See: <strong>Azure S2S VPN section – Step 4b)
</strong></div>
<img src="https://msdnshared.blob.core.windows.net/media/2017/07/071217_0229_CreatingaIK11.png" alt="" /></li>
 	<li>
<div>On <strong>Peers</strong> Tab – Click + (Plus) and add a new IPSec Peer. In IPSec terminology we are working on IKE Phase 1 (Main Mode) on this configuration tab. Here we need Azure Gateway Public IP, specify Pre-Shared Key which can be specified on <strong>Part I – Step 7 (Create the VPN connection).</strong></div>
<strong>Note:</strong> If you MikroTik does not show IKEv2 make sure you have at least RouteOS release: 6.38. Before that release only IKEv1 is available.

<img src="https://msdnshared.blob.core.windows.net/media/2017/07/071217_0229_CreatingaIK12.png" alt="" /></li>
 	<li>
<div>On the same screen, go to <strong>Advance</strong> Tab and make adjustment on Lifetime to 8h = 28,800 seconds based on Azure official documentation <a href="https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-about-vpn-devices">IPSec/IKE parameters</a> - SA (security association) for IKE Phase 1 (Main Mode).</div>
<img src="https://msdnshared.blob.core.windows.net/media/2017/07/071217_0229_CreatingaIK13.png" alt="" /></li>
 	<li>
<div>On <strong>Encryption</strong> Tab, you can use the default which are supported by Azure or make adjustment for a stronger Hash and Encryption (See details here: <a href="https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-about-vpn-devices">IPSec/IKE parameters</a>) . For this article the following have been selected:</div>
<img src="https://msdnshared.blob.core.windows.net/media/2017/07/071217_0229_CreatingaIK14.png" alt="" /></li>
 	<li>
<div>Now, let's move on to IKE Phase 2 (Quick Mode) which is represented in MikroTik by <strong>Proposals. </strong>For this one you can either create a new one (+ sign) or change the default one. In case you create a new, make sure to change the Step 2 (IP Sec Policy) and Action Tab and select the appropriate Proposal. For this article, we will change the default IPSec Proposal which the following have been selected based on official Azure information for IKE Phase 2 in <a href="https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-about-vpn-devices">IPSec/IKE parameters</a>:</div>
<img src="https://msdnshared.blob.core.windows.net/media/2017/07/071217_0229_CreatingaIK15.png" alt="" /></li>
 	<li>
<div>The last step to make sure VPN will route correctly between On-Prem and Azure is to configure a NAT Rule. This is done by going <strong>IP</strong> and select <strong>Firewall</strong> – Select <strong>NAT</strong> tab</div>
<ol>
 	<li>Add Chain as <strong>srcnat </strong>and both subnets (On-Prem and Azure Subnet).</li>
</ol>
<img src="https://msdnshared.blob.core.windows.net/media/2017/07/071217_0229_CreatingaIK16.png" alt="" />
<ol>
 	<li>On Action tab select <strong>accept</strong></li>
</ol>
<img src="https://msdnshared.blob.core.windows.net/media/2017/07/071217_0229_CreatingaIK17.png" alt="" /></li>
</ol>
<h3>Validating the IPSec Tunnel</h3>
<strong>Ping between two computers in each side. </strong>In the right side On-Prem computer (192.168.88.17) correctly pinging Azure VM (10.4.0.4) and the other way around works fine too.

<img src="https://msdnshared.blob.core.windows.net/media/2017/07/071217_0229_CreatingaIK18.png" alt="" />

In both sides we see TTL of 126 which corresponds to two hops (both Gateways) getting decremented. Default TTL of Windows machines is 128.

<strong>Note:</strong> By default ICMP is disabled. Make sure you allow ICMP by running the following PowerShell command:
<span style="font-family: Lucida Console;font-size: 9pt"><strong><span style="color: blue">Set-NetfirewallRule </span><span style="color: navy">-Name </span><span style="color: blueviolet">FPS-ICMP4-ERQ-In </span><span style="color: navy">-Enable </span></strong><span style="color: blueviolet"><strong>True</strong>
</span></span>

<strong>On Azure Side
</strong>

On Azure Portal you can validate brand new tunnel created as showed on item 8. Verify the VPN connection above. That can be also validated by PowerShell by using command: <strong>Get-AzureRmVirtualNetworkGatewayConnection -Name From-Azure-to-Mikrotik -ResourceGroupName S2SVPNDemo</strong>

<img src="https://msdnshared.blob.core.windows.net/media/2017/07/071217_0229_CreatingaIK19.png" alt="" /><strong>
</strong>

<strong>On MikroTik Side
</strong>There are multiple ways to validate the IPSec VPN connection to Azure on MikroTik. Here are some ways:
1. IPSec – <strong>Policies</strong> tab. It shows if the IKE Phase 2 is working correctly.

<img src="https://msdnshared.blob.core.windows.net/media/2017/07/071217_0229_CreatingaIK20.png" alt="" />
2.<strong> Remote Peers</strong> tab. This shows if IKE Phase 1 (Main mode) is working correctly.

<img src="https://msdnshared.blob.core.windows.net/media/2017/07/071217_0229_CreatingaIK21.png" alt="" />
3.<strong> Installed SAs</strong> tab shows current Security Associations:

<img src="https://msdnshared.blob.core.windows.net/media/2017/07/071217_0229_CreatingaIK22.png" alt="" />
<h3>IPSec Troubleshooting</h3>
If something does not work for some reason during your configuration, you can do a troubleshooting to determine what is going on. MikroTik provides a good interface for logging and troubleshooting IPSec in case you want to get more detailed information on what is going on. Events can be visualized in Log Menu but to ensure you can get IPSec events exposed you need to make a simple change in Logging configuration (System – Logging) and add the IPSec as a Topic:

<img src="https://msdnshared.blob.core.windows.net/media/2017/07/071217_0229_CreatingaIK23.png" alt="" />

After you add this new Logging rule you have will see the following detailed IPSec events:

<img src="https://msdnshared.blob.core.windows.net/media/2017/07/071217_0229_CreatingaIK24.png" alt="" />

<strong>Extra Tip:</strong> See comments about TCP MSS Clamp configuration shared by a reader.<strong>
</strong>

<strong>Conclusion
</strong>

In this article we demonstrated how to setup a IPSec Site-to-Site VPN using IKEv2 (Route-Based) between Azure and MikroTik RouterBoard. These instructions also may help you to setup any IPSec device which is compatible with Azure VPN Gateway settings. I hope you liked the information shared here and please let us know below in the comments if you have additional questions. I would like to make a special thanks to Azure Support Escalation Engineer Daniel Pires who co-author this article with me. Thanks!]]></content:encoded>
    </item>
    <item>
      <title>NetTIP: Extracting Digital Certificates from Network Captures in Easy Steps</title>
      <link>https://docs.microsoft.com/archive/blogs/netgeeks/nettip-extracting-digital-certificates-from-network-captures-in-easy-steps</link>
      <pubDate>Tue, 09 May 2017 10:54:00 GMT</pubDate>
      <dc:creator><![CDATA[Daniel Mauser - [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/netgeeks/?p=467</guid>
      <description><![CDATA[Introduction


Troubleshooting connectivity issues in scenarios involving SSL/TLS communications...]]></description>
      <content:encoded><![CDATA[<span style="font-size: 12pt;text-decoration: underline"><strong>Introduction
</strong></span>

Troubleshooting connectivity issues in scenarios involving SSL/TLS communications usually involve an important point to verify whether the certificates exchanged during that process (TLS Client/Server Hello) is the correct one and has the attributes or extensions in place such as EKU, SAN, and others.

In this article, we will show you how to extract digital certificate information by using two network excellent and well known analysis tools: Microsoft Message Analyzer and Wireshark. The good news is you can also get some hands on and review the same captures used this article. Just go to <a href="https://gallery.technet.microsoft.com/Network-Captures-Library-29061327">Network Capture Library</a> to have access to them.

<span style="text-decoration: underline"><strong>Side Note:</strong></span> Other captures will be added soon in the Network Capture Library with different scenario where you can download, review and learn from them.

The main goal of this article is more educational on teaching you how to extract information of digital certificates from a network capture. I would like to anticipate that if you search Internet you can find several ready tools and other methodologies to perform same action. However, most of those tools are focus on TLS for HTTP traffic (HTTPS) and we will explore here other scenarios you may face, for example, 802.1x that will explore in this article.

<span style="font-size: 12pt;text-decoration: underline"><strong>Exporting Web Server Certificate using Message Analyzer
</strong></span>

We are going to open capture named <a href="https://gallery.technet.microsoft.com/Network-Captures-Library-29061327"><strong>HTTPS-TLS-Certificate.cap</strong></a><strong>
</strong>

After opening the capture in Message Analyzer follow these steps:
<ol>
 	<li>Apply the following filters just to show frames where certificate information is <strong><em>*Summary contains "Certificate"</em></strong></li>
 	<li>Select the frame and start to expand each property on the package focusing on Certificate.</li>
 	<li>Select <strong>in x509_cert</strong>.</li>
 	<li>Automatically Message Data 1 window will highlight in the grey portion of the capture with the certificate to be exported.
Note: If Message Data 1 is not displayed just proceed to menu <span style="text-decoration: underline">Tools -&gt; Message Data – Message Data 1</span></li>
 	<li>Right-click in any gray area of Message Data 1 window as <strong><em>Save Selected Bytes As… </em></strong>as type any file name and just make sure the extension is .CER</li>
</ol>
<img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/05/050917_1550_NetTIPExtra1.png" />
<ol>
 	<li>
<div>After successful get the file exported. Just go to the folder and double click in the file and you will be able to see it.</div>
<img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/05/050917_1550_NetTIPExtra2.png" />

<strong>Note:</strong> In your review, you may get a warning message while opening the certificate because your system does not trust on it. So, this may be expected.</li>
</ol>
<span style="font-size: 12pt;text-decoration: underline"><strong>Exporting Client and RADIUS Server Ceritificates from EAP-TLS traffic (802.1x) using Wireshark
</strong></span>

We are going to open capture named <a href="https://gallery.technet.microsoft.com/Network-Captures-Library-29061327"><strong>EAP-TLS-Certificate.cap</strong></a>.<span style="font-size: 12pt;text-decoration: underline"><strong>
</strong></span>

The same process above you can perform with Wireshark. In this scenario, Client and RADIUS Server Certificate during the process of EAP-TLS authentication are going to be extracted:
<ol>
 	<li>Select frames where we have Certificate explicitly in the information. For RADIUS server certificate, select frame 17. Client certificate can be done by selecting frame 21.</li>
 	<li>Expand bottom part on Packet details window and select <strong>Certificate.</strong></li>
 	<li>Right Click and Export Packet Bytes (CTRL + H) and name it and add extension .<strong>CER</strong>.</li>
</ol>
<img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/05/050917_1550_NetTIPExtra3.png" /><strong>
</strong>

<strong>*Side Note:</strong> You may be wondering why do we have source and destination shown as MAC address? Again this 802.1x and machine is authenticating to get an IP.
<ol>
 	<li>
<div>Repeat same steps above to export the client certificate and final output both exported <strong>.CER </strong>files are:</div>
<img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/05/050917_1550_NetTIPExtra4.png" /></li>
</ol>
<span style="font-size: 12pt;text-decoration: underline"><strong>Wireshark Extra Bonus Tip:
</strong></span>

One cool very cool tip I would like to present is a way to expose the certificate names in Wireshark as a Column. That will come in handy loading a capture and digital certificate name will be exposed to the column:
<ol>
 	<li>Add a custom type column in via menu Edit – Preferences and add in Fields <strong>x509sat.printableString</strong> as shown in this picture:</li>
</ol>
<img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/05/050917_1550_NetTIPExtra5.png" /><strong>
</strong>      2. Certificate information will be exposed to the Column with the Certification Authority (issuer) and certificate as shown below:

<img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/05/050917_1550_NetTIPExtra6.png" /><strong>
</strong>

In the example above: <span style="text-decoration: underline">Contoso-EntCA</span> is the Issuer Certification Authority (CA), <span style="text-decoration: underline">WADC01.contoso.corp</span> is the certificate of NPS Server (RADIUS) and <span style="text-decoration: underline">WA-W10CLI2.contoso.corp</span> is the certificate from the client.<span style="text-decoration: underline"><strong>
</strong></span>

<span style="font-size: 12pt;text-decoration: underline"><strong>Conclusion
</strong></span>

This post described in easy steps on how to export digital certificates from network captures by using either Microsoft Message Analyzer or Wireshark. We will be posting in the next few days a troubleshooting case scenario that will explore and resolve an issue that will leverage digital certificate information. Stay Tune! Thanks for visiting us and I hope you learned something new today.]]></content:encoded>
    </item>
    <item>
      <title>How to authenticate multiple WIFI SSIDs on a single NPS server (RADIUS)</title>
      <link>https://docs.microsoft.com/archive/blogs/netgeeks/how-to-authenticate-multiple-wifi-ssids-on-a-single-nps-server-radius</link>
      <pubDate>Tue, 02 May 2017 09:52:34 GMT</pubDate>
      <dc:creator><![CDATA[Daniel Mauser - [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/netgeeks/?p=235</guid>
      <description><![CDATA[Introduction


Recently I worked with customer on interesting scenarios where they needed they...]]></description>
      <content:encoded><![CDATA[<span style="font-size: 12pt;text-decoration: underline"><strong>Introduction
</strong></span>

Recently I worked with customer on interesting scenarios where they needed they were unable to make necessary restriction when using multiple WIFI Networks. They created WIFI Network devices such as Computer, Tablets and Mobile Phones. That was necessary because which network provided a different level of access. The goal was to ensure all WIFI networks (SSIDs) can be handled by a single NPS Server and users cannot use their credentials to access other WIFI SSID if they are not authorized. However, after creating a few Network Policy Rules, the first side effect was when a user accessed SSID, for example for SSID dedicated to mobiles, user was getting authenticated in another rule dedicated SSID for computers.

<span style="font-size: 12pt;text-decoration: underline"><strong>Scenario
</strong></span>

For this scenario, the following Network Policy Rules and respective specific Groups show below:
<ul>
 	<li><strong>Rule 1: Wireless-Computers [SSID: CTCORP]
</strong>- NAS Port Type = Wireless - Other OR Wireless - IEE 802.11
- Windows Groups = CONTOSO\WIFI-Corp-Users</li>
 	<li><strong>Rule 2: Wireless-Mobiles [SSID: CTMOBILE] </strong>
- NAS Port Type = Wireless - Other OR Wireless - IEE 802.11
- Windows Groups = CONTOSO\WIFI-Mobiles</li>
 	<li><strong>Rule 3: Wireless-Tablets [SSID: CTTABLETS]</strong>
- NAS Port Type = Wireless - Other OR Wireless - IEE 802.11
- Windows Groups = CONTOSO\WIFI-Tablets</li>
</ul>
Here is a view of the same rules above inside the NPS interface:

<img src="https://msdnshared.blob.core.windows.net/media/2017/05/050217_1451_Howtoauthen1.png" alt="" />

The diagram below shows how the policies should work. One of the requirements is to ensure when I user does not belong to a group, she or he should not be authorized to use the respective SSID. In this case, we can do more granular control of which type of devices can access the network with different restrictions. For example, for tables accessing CTTABLETS will have only access to Internet but no access internal resources, while for computers accessing WIFI SSID CTCORP they should have full access to the network and Internet.

<img src="https://msdnshared.blob.core.windows.net/media/2017/05/050217_1451_Howtoauthen2.png" alt="" />

The real problem starts when user belongs to two or more groups. For example, user John Smith is authorized to access WIFI from all types of devices, which means he belongs to all groups listed above. However, when using his computer, we need to make sure he authenticates on WIFI SSID CTCORP, when using his Smartphone, he needs to access WIFI SSID CTMOBILE and when he uses his Tablet he needs to use WIFI SSD CTTABLETS.

In case we John Smith is removed from group CONTOSO\WIFI-Mobiles he will still have access to the SSID CTMOBILE. Why? If you see the list of rules Rule: Wireless-Computers [SSID: CTCORP] has process order 1. Which means he will be authenticated by that Rule.

<span style="font-size: 12pt;text-decoration: underline"><strong>Resolution
</strong></span>The Solution for this scenario is to add a <span style="text-decoration: underline">Condition</span> inside the Network Policy and specify the <strong>Called Station ID </strong>which presents the WIFI Access Point MAC Address plus SSID.<strong>
</strong>This information can be easily extracted from NPS Event logs (Event Viewer – Custom Views – Server Roles – Network Policy and Access Services). When user is using a specify SSID that information is specified on <strong>Called Station ID</strong> populated as highlighted below.<strong>
</strong>

<span style="font-size: 9pt"><em>Source: Microsoft-Windows-Security-Auditing
Event ID: 6278
Task Category: Network Policy Server
Level: Information
Keywords: Audit Success
Description: Network Policy Server granted full access to a user because the host met the defined health policy.
Security ID: CONTOSO\JohnSmith
Account Name: CONTOSO\JohnSmith
Account Domain: Domain
Fully Qualified Account Name: CONTOSO\JohnSmith   </em></span>

<span style="background-color: yellow"><strong>Called Station Identifier: </strong>00-1C-C5-01-52-00: <strong>CTMOBILE </strong></span><strong>
</strong>

<span style="font-size: 9pt"><em>Calling Station Identifier: 25-E6-8C-24-E3-11
NAS: NAS IPv4 Address: 10.1.1.210
NAS IPv6 Address: -
NAS Identifier: 3Com NAS
Port-Type: Wireless - IEEE 802.11
RADIUS Client: Client Friendly Name: WIFIAccessPoint
Client IP Address: 10.1.1.210
Authentication Details: Connection Request Policy
Name: Secure Wireless Connections Network Policy
Name: 802.1X-Wireless-MOBILES [CORPv3]
Authentication Provider: Windows
</em></span>

Note: While creating the condition in Network Policy do not make confusion between <span style="text-decoration: underline">Called Station Identifier</span> with <span style="text-decoration: underline">Calling Station Identifier</span> which presents real computer's MAC address.

In summary, here are the action to do in each one of the Network Policy Rile, where you will specify the respective SSID as shown:<strong>
</strong>
<ul>
 	<li><strong>Rule 1 Wireless-Computers [SSID: CTCORP]
</strong>Called Station ID=<strong> CTCORP</strong></li>
 	<li><strong>Rule 2 Wireless-Mobiles [SSID: CTMOBILE] </strong>
Called Station ID=<strong> CTMOBILE</strong></li>
 	<li><strong>Rule 3 Wireless-Tablets [SSID: CTTABLETS]</strong>
Called Station ID=<strong> CTTABLETS</strong></li>
</ul>
Here is an example on how is done via GUI in five and self-explanatory simple steps :

<img src="https://msdnshared.blob.core.windows.net/media/2017/05/050217_1451_Howtoauthen3.png" alt="" />

It is important to note that you just need to add the SSID name as is and it will be searched in the field as string in any position. You can play with regular expression also well to adequate with your needs. You can leverage this documentation in TechNet: <a href="https://technet.microsoft.com/en-us/library/cc755272(v=ws.10).aspx">Using Regular Expressions in NPS</a>

<span style="font-size: 12pt;text-decoration: underline"><strong>Conclusion
</strong></span>

In this article, we demonstrated how to allow a single user who belongs which needs access multiple WIFI Networks (SSID's) while using a single Network Policy Server (NPS) to perform the authentication correctly on its respective rule matching the SSID by using Called Station ID. I hope this help you to implement this kind of scenario on your network and let us know your thoughts or questions in the comments below.]]></content:encoded>
    </item>
    <item>
      <title>Issues to join a node to a Cluster between sites? Problem solved!</title>
      <link>https://docs.microsoft.com/archive/blogs/netgeeks/issues-to-join-a-node-to-a-cluster-between-sites-problem-solved</link>
      <pubDate>Mon, 01 May 2017 09:16:15 GMT</pubDate>
      <dc:creator><![CDATA[Dante Stancato]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/netgeeks/?p=206</guid>
      <description><![CDATA[Introduction


Here is Dante Stancato, Support Engineer from Windows Networking team, and in this...]]></description>
      <content:encoded><![CDATA[<span style="text-decoration: underline"><strong><span style="font-size: 12pt">Introduction</span><span style="font-size: 1pt">
</span></strong></span>

<span style="font-size: 12pt">Here is <a href="https://www.linkedin.com/in/dantestancato/">Dante Stancato</a>, Support Engineer from Windows Networking team, and in this article, we will explore an interesting topic, based in several cases we've received recently, where you may experience communication failures between two Failover Cluster Nodes. This behavior usually happens on the process of joining nodes to a Failover Cluster in an environment where you have third party network equipment performing packet inspection/packet forwarding between the machines involved.
</span>

<span style="font-size: 12pt">In this scenario, there are other cluster node nodes in both sites which are already joined and do not experience the issue. However, when you try to join new node in cluster, you receive messages that state the operation time out, or that is not able to contact the cluster. During those type of cases, the initial course is start the work with of Cluster Support Engineer who was not able to identify anything abnormal on reviewing cluster logs, or any relevant information from usual data sources. Networking support engineer gets involved reviewing if there's issues outside cluster which maybe affecting the node joining process and that was the case as you can see more details below.
</span>

<span style="font-size: 12pt"><strong><span style="text-decoration: underline">Environment</span>
</strong></span>

<span style="font-size: 12pt">This Scenario is configured as follows:
</span>
<ul>
 	<li><span style="font-size: 12pt">Node A, located at Site A (With IP Address 192.168.0.100)
</span></li>
 	<li><span style="font-size: 12pt">WAN Link with third party network equipment performing packet inspection / packet forwarding
</span></li>
 	<li><span style="font-size: 12pt">Node B, located at Site B (With IP Address 192.168.1.100)
</span></li>
</ul>
<span style="font-size: 12pt;text-decoration: underline"><strong>Data Collection
</strong></span>

<span style="font-size: 12pt">In order to troubleshoot this issue is necessary to get a regular network capture trace plus a trace of the <a href="https://blogs.msdn.microsoft.com/clustering/2016/05/27/netft-virtual-adapter-performance-filter/"><span style="text-decoration: underline">NetFT</span></a> using the following command:
</span>

<span style="font-size: 10pt"><em>netsh trace start capture=yes overwrite=yes maxsize=1024 tracefile=c:\base_cluster.etl provider={7E66368D-B895-45F2-811F-FB37940421A6} keywords=0xffffffffffffffff level=0xff
</em></span>

<span style="font-size: 12pt">During the process of Node B to the Cluster fails and we need to stop the capture by running:
</span>

<span style="font-family: Courier New">Netsh trace stop
</span>

<span style="font-size: 12pt;text-decoration: underline"><strong>Data Analysis
</strong></span>

<span style="font-size: 12pt">Reviewing the trace taken and focusing on NetFT component you can observe the following events along the trace:
</span>

<em><span style="font-size: 9pt">[26] 0000.0000::12/15/16-12:38:00.2645164 [rm] rmadp_c797 RmHeartbeatTimerDpc() - Monitor FFFFE0007B4522A0 (192.168.0.100:3343 - 192.168.1.100:3343) <strong>sending RCP request</strong> FFFFE0007B4C7570 (sequence 7). Ticks=5969997, last=5969741, delay=256.
[26] 0000.0000::12/15/16-12:38:00.2645404 [rm] rmadp_c844 RmHeartbeatTimerDpc() - Monitor FFFFE0007B4522A0 (192.168.0.100:3343 - 192.168.1.100:3343) <strong>missed HB response</strong>, gap=6
[8] 0000.0000::12/15/16-12:38:00.2645566 [rm] rmadp_c1035 RmSendComplete() - Monitor FFFFE0007B4522A0 (192.168.0.100:3343 - 192.168.1.100:3343) <strong>completed RCP message</strong> FFFFE0007B4C7570 with 0.
[12] 0000.0000::12/15/16-12:38:00.2734304 [rm] rmsup_c1412 RmFilterRcpMessage() - <strong>Validation of RCP packet failed - Route monitor (192.168.0.100:3343 - 192.168.1.100:13429) FT IPs (fe80::d5e4:bf14:708f:b3db - fe80::ec3f:16be:f9a4:3cf3) not found.
</strong>[12] 0000.0000::12/15/16-12:38:00.2734317 [ta] tnsup_c113 TaFilterPacket() - <strong>Dropping received RCP messages from 192.168.1.100:13429.</strong></span><span style="font-size: 12pt">
</span></em>

<span style="font-size: 12pt">What needs to be checked in here is TCP the source and destination port on each packet. As stated in the document Technet documents <a href="https://technet.microsoft.com/en-us/library/hh535729.aspx">Networking in Failover Clusters</a>, source and destination port of Failover Cluster's Heartbeat must be UDP 3343. When this port is changed, even in source or destination, by default, the Cluster will discard the packets, causing communication failures.
</span>

<span style="font-size: 12pt">Filtering the network capture for the conversation between Node B and Node A as well as UDP 3343 port, we will notice the following behavior on Heartbeat packets:
</span>
<div>
<table style="border-collapse: collapse" border="0"><colgroup> <col style="width: 68px" /> <col style="width: 113px" /> <col style="width: 113px" /> <col style="width: 150px" /> <col style="width: 150px" /> <col style="width: 90px" /> <col style="width: 533px" /></colgroup>
<tbody valign="top">
<tr style="height: 29px;background: #ed7d31">
<td valign="bottom" style="padding-left: 6px;padding-right: 6px;border-top: solid black 1.0pt;border-left: none;border-bottom: solid black 1.0pt;border-right: none"><span style="font-size: 10pt"><strong>Frame </strong></span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px;border-top: solid black 1.0pt;border-left: none;border-bottom: solid black 1.0pt;border-right: none"><span style="font-size: 10pt"><strong>Time </strong></span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px;border-top: solid black 1.0pt;border-left: none;border-bottom: solid black 1.0pt;border-right: none"><span style="font-size: 10pt"><strong>Time Delta</strong></span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px;border-top: solid black 1.0pt;border-left: none;border-bottom: solid black 1.0pt;border-right: none"><span style="font-size: 10pt"><strong>Source IP</strong></span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px;border-top: solid black 1.0pt;border-left: none;border-bottom: solid black 1.0pt;border-right: none"><span style="font-size: 10pt"><strong>Destination IP</strong></span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px;border-top: solid black 1.0pt;border-left: none;border-bottom: solid black 1.0pt;border-right: none"><span style="font-size: 10pt"><strong>Protocol</strong></span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px;border-top: solid black 1.0pt;border-left: none;border-bottom: solid black 1.0pt;border-right: none"><span style="font-size: 10pt"><strong>Description</strong></span></td>
</tr>
<tr style="height: 29px;background: #d9d9d9">
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">76</span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">12:38:05 </span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">0.9755848</span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">192.168.0.100</span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">192.168.1.100</span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">UDP</span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">UDP:SrcPort = 3343, DstPort = 3343, Length = 112</span></td>
</tr>
<tr style="height: 29px">
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">77</span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">12:38:06 </span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">0.9062613</span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">192.168.0.100</span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">192.168.1.100</span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">UDP</span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">UDP:SrcPort = 3343, DstPort = 3343, Length = 112</span></td>
</tr>
<tr style="height: 29px;background: #d9d9d9">
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">78</span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">12:38:08 </span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">2.1091963</span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">192.168.0.100</span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">192.168.1.100</span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">UDP</span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">UDP:SrcPort = 3343, DstPort = 3343, Length = 112</span></td>
</tr>
<tr style="height: 29px">
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">79</span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">12:38:08 </span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">0.0092498</span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">192.168.1.100</span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">192.168.0.100</span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">UDP</span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">UDP:SrcPort = <span style="background-color: yellow">13429</span>, DstPort = 3343, Length = 112</span></td>
</tr>
<tr style="height: 29px;background: #d9d9d9">
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">80</span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">12:38:08 </span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">0.4905616</span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">192.168.1.100</span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">192.168.0.100</span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">UDP</span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px"><span style="font-family: Courier New;font-size: 10pt">UDP:SrcPort = <span style="background-color: yellow">13429</span>, DstPort = 3343, Length = 74</span></td>
</tr>
<tr style="height: 29px">
<td valign="bottom" style="padding-left: 6px;padding-right: 6px;border-top: none;border-left: none;border-bottom: solid black 1.0pt;border-right: none"><span style="font-family: Courier New;font-size: 10pt">81</span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px;border-top: none;border-left: none;border-bottom: solid black 1.0pt;border-right: none"><span style="font-family: Courier New;font-size: 10pt">12:38:08 </span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px;border-top: none;border-left: none;border-bottom: solid black 1.0pt;border-right: none"><span style="font-family: Courier New;font-size: 10pt">0.0000013</span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px;border-top: none;border-left: none;border-bottom: solid black 1.0pt;border-right: none"><span style="font-family: Courier New;font-size: 10pt">192.168.1.100</span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px;border-top: none;border-left: none;border-bottom: solid black 1.0pt;border-right: none"><span style="font-family: Courier New;font-size: 10pt">192.168.0.100</span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px;border-top: none;border-left: none;border-bottom: solid black 1.0pt;border-right: none"><span style="font-family: Courier New;font-size: 10pt">UDP</span></td>
<td valign="bottom" style="padding-left: 6px;padding-right: 6px;border-top: none;border-left: none;border-bottom: solid black 1.0pt;border-right: none"><span style="font-family: Courier New;font-size: 10pt">UDP:SrcPort = <span style="background-color: yellow">13429</span>, DstPort = 3343, Length = 94</span></td>
</tr>
</tbody>
</table>
</div>
<span style="font-size: 12pt">If we look at the network packet on the source side, we can see that source and destination ports are the expected one: <span style="background-color: lime">UDP 3343:</span>
</span>

<span style="font-size: 10pt">Frame: Number = 78, Captured Frame Length = 146, MediaType = ETHERNET
+ Ethernet: Etype = Internet IP (IPv4),DestinationAddress:[10-8C-CF-56-01-01],SourceAddress:[5C-B4-01-C8-70-52]
+ Ipv4: Src = 192.168.0.100, Dest = 192.168.1.100, Next Protocol = UDP, Packet ID = 11776, Total IP Length = 132
- Udp: SrcPort = 3343, DstPort = 3343, Length = 112
<strong><span style="background-color: lime">SrcPort: 3343
DstPort: 3343</span>
</strong>TotalLength: 112 (0x70)
Checksum: 27094 (0x69D6)
+ UDPPayload: SourcePort = 3343, DestinationPort = 3343
</span>

<span style="font-size: 12pt">Now, if we look at that same package but at destination side, we will notice a slightly different behavior in the packet, which in a quick look may seem harmless, but it's what really is causing us all our headaches:
</span>

<span style="font-size: 10pt">Frame: Number = 79, Captured Frame Length = 146, MediaType = ETHERNET
+ Ethernet: Etype = Internet IP (IPv4),DestinationAddress:[5C-B4-01-C8-70-52],SourceAddress:[10-8C-CF-56-01-01]
+ Ipv4: Src = 192.168.1.100, Dest = 192.168.0.100, Next Protocol = UDP, Packet ID = 11261, Total IP Length = 132
- Udp: SrcPort = 13429, DstPort = 3343, Length = 112
<strong><span style="background-color: yellow">SrcPort: 13429</span><span style="background-color: yellow">
</span>DstPort: 3343
</strong>TotalLength: 112 (0x70)
Checksum: 52191 (0xCBDF)
+ UDPPayload: SourcePort = 13429, DestinationPort = 3343
</span>

<span style="font-size: 12pt">As you can see, the source port of the packet, while going through the WAN link, comes different or modified to destination. This exact same behavior is noticed in both sides of the communication in a network capture, where all the packets leave the server with the correct source port but arrives with a different one at destination.
</span>

<span style="font-size: 12pt"><strong><span style="text-decoration: underline">Solution</span>
</strong></span>

<span style="font-size: 12pt">Considering that, from a Windows perspective, the behavior while sending packets is the expected (I mean, Windows always send the packets with source and destination ports as UDP 3343) and that, while going through the WAN link between sites the source port gets changed, it is recommend reviewing the following actions:
</span>
<ul>
 	<li>
<div><span style="font-size: 12pt">Review the network infrastructure to be able to identify:
</span></div>
<ul>
 	<li><span style="font-size: 12pt">How many hops are between the affected nodes?
</span></li>
 	<li><span style="font-size: 12pt">What is the purpose of each of the hops between the nodes?
</span></li>
</ul>
</li>
 	<li><span style="font-size: 12pt">Review the presence of devices doing packet forwarding or packet inspection
</span></li>
 	<li><span style="font-size: 12pt">Take network traces from each one of the hops to be able to identify which one of them is changing the Source port in the communication
</span></li>
 	<li><span style="font-size: 12pt">Contact Network Equipment's vendor to make the necessary corrective actions
</span></li>
</ul>
<span style="font-size: 12pt">In case you have a device manufactured by F5 between the Cluster Nodes communication, there's a specific recommendation to follow <a href="https://support.f5.com/kb/en-us/products/big-ip_ltm/manuals/product/ltm_configuration_guide_10_0_0/ltm_virtual.html"><span style="text-decoration: underline">here</span></a> for those specific cases where source port has to be preserved. As described in F5 documentation, for Windows Failover Clusters, the next best option is to perform a correct configuration:
</span>
<div>
<table style="border-collapse: collapse" border="0"><colgroup> <col style="width: 113px" /> <col style="width: 900px" /> <col style="width: 12px" /> <col style="width: 10px" /></colgroup>
<tbody valign="top">
<tr style="height: 21px;background: #bfbfbf">
<td valign="bottom" style="border: solid black 0.75pt;padding: 10px 10px 7px 10px"><span style="font-size: 10pt"><em><a></a>Property</em></span></td>
<td valign="bottom" style="border-top: solid black 0.75pt;border-left: none;border-bottom: solid black 0.75pt;border-right: solid black 0.75pt;padding: 10px 10px 7px 10px"><span style="font-size: 10pt"><em><a></a>Description</em></span></td>
<td valign="bottom" style="border-top: solid black 0.75pt;border-left: none;border-bottom: solid black 0.75pt;border-right: solid black 0.75pt;padding: 10px 10px 7px 10px" colspan="2"><span style="font-size: 10pt"><em><a></a>Default Value</em></span></td>
</tr>
<tr style="height: 252px">
<td style="padding-top: 10px;padding-bottom: 7px;padding-right: 10px"><span style="font-size: 10pt"><strong><em>Source Port</em></strong></span></td>
<td style="padding-top: 10px;padding-bottom: 7px;padding-right: 10px"><span style="font-size: 10pt"><em>Specifies whether the system preserves the source port of the connection. Possible values are:
</em></span><span style="font-size: 10pt"><em><span style="text-decoration: underline">Preserve:</span> Specifies that the system preserves the value configured for the source port, unless the source port from a particular SNAT is already in use, in which case the system uses a different port.
<span style="text-decoration: underline">Preserve Strict:</span> Specifies that the system preserves the value configured for the source port. If the port is in use, the system does not process the connection. If the port is in use by another connection, the system uses that source port anyway, and the destination server cannot distinguish the traffic of the connections sharing that source port<span style="text-decoration: underline">. F5 Networks recommends that you restrict use of this setting to cases that meet at least one of the following conditions:</span>
<span style="background-color: yellow">The port is configured for UDP traffic.
</span>The system is configured for nPath routing or is running in transparent mode (that is, there is no translation of any other Layer 3 or Layer 4 field).
There is a one-to-one relationship between virtual IP addresses and node addresses, or clustered multi-processing (CMP) is disabled.
Change: Specifies that the system changes the source port. This setting is useful for obfuscating internal network addresses.</em></span></td>
<td style="padding-top: 10px;padding-bottom: 7px;padding-right: 10px" colspan="2"><span style="font-size: 10pt"><strong><em>Preserve</em></strong></span></td>
</tr>
</tbody>
</table>
</div>
<span style="font-size: 12pt">The recommended option made by F5 is to configure the Virtual Servers to use option "Source Port" as "Preserve Strict". By default, when configuring a Virtual Server, the option for "Source Port" is configured as "Preserve", in which if the source port is already in use by any other device in the environment, it will use a new port number, causing the issues mentioned above.
</span>

<span style="font-size: 12pt">It is always a recommend that you get in touch with the Vendor, in this case F5, to verify accordingly about these configurations, because Microsoft does not provide support for F5 equipment. We are simply sharing this documentation as reference to accelerate the solution of the issue.
</span>

<span style="font-size: 12pt">I hope this entry helped you to understand this behavior and (hopefully) to keep your environment up and running.
</span>

<span style="font-size: 12pt">As usual, thank you for reading and of course for keep trusting Microsoft.
</span>

<span style="font-size: 12pt">See you soon!!
</span>

<span style="font-size: 12pt"><em>Special Thanks: This blog note wouldn't be possible without the help of my colleagues, so I would like to publicly thank them: Felicio Da Silva (LATAM Technical Advisor - Core / Platforms), Danilo Gonçalves (LATAM Support Escalation Engineer - Core / Platforms), Nicolas Rojas (LATAM Support Engineer - Core / Platforms) and Martin Kirtchayan (LATAM Technical Advisor - Networking / Identity).
</em></span>

<span style="font-size: 12pt">
</span>]]></content:encoded>
    </item>
    <item>
      <title>Basic PS script to perform a Network Capture (packet sniffing)</title>
      <link>https://docs.microsoft.com/archive/blogs/netgeeks/basic-ps-script-to-perform-a-network-capture-packet-sniffing</link>
      <pubDate>Thu, 27 Apr 2017 03:50:15 GMT</pubDate>
      <dc:creator><![CDATA[Daniel Mauser - [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/netgeeks/?p=165</guid>
      <description><![CDATA[Hello all, here is Daniel Mauser again and today I'm going to show you how you can leverage network...]]></description>
      <content:encoded><![CDATA[<span style="font-family: 'Segoe UI',sans-serif;color: #333333"><span>Hello all</span>, here is <a href="https://twitter.com/danmauser">Daniel Mauser</a> again and today I'm </span><span style="font-family: 'Segoe UI',sans-serif;color: #333333">going to show you how you can leverage network capture traces using native PowerShell cmdlet. Before </span><span style="font-family: 'Segoe UI',sans-serif;color: #333333">that we need to reference you, just as quick recap, to a great article from Hey </span><span style="font-family: 'Segoe UI',sans-serif;color: #333333">Scripting Guy! where he shows how to get a network capture using PowerShell (<a href="https://blogs.technet.microsoft.com/heyscriptingguy/2015/10/12/packet-sniffing-with-powershell-getting-started/">Packet </a></span><span style="font-family: 'Segoe UI',sans-serif;color: #333333"><a href="https://blogs.technet.microsoft.com/heyscriptingguy/2015/10/12/packet-sniffing-with-powershell-getting-started/">Sniffing with PowerShell: Getting Started</a>). On this article he demonstrate </span><span style="font-family: 'Segoe UI',sans-serif;color: #333333">using relevant Network Provides such as Microsoft-Windows-TCPIP but the end </span><span style="font-family: 'Segoe UI',sans-serif;color: #333333">result capture it does not look like the same capture taken by <span class="SpellE"><b>netsh</b></span><b> trace start capture=yes</b>.</span>
<div class="WordSection1">
<p class="MsoNormal" style="line-height: normal"><b><u><span style="font-size: 12.0pt;font-family: 'Segoe UI',sans-serif;color: #333333">Is there any way to do it via PowerShell?</span></u></b></p>
<p class="MsoNormal" style="line-height: normal"><span style="font-family: 'Segoe UI',sans-serif;color: #333333"> The short answer is yes. We developed a very basic script demonstrating how to do that. The trick part is to get the right ETW provider which is: <b>Microsoft-Windows-NDIS-<span class="SpellE">PacketCapture, </span></b><span class="SpellE">more details to come. </span></span></p>
<p class="MsoNormal" style="line-height: normal"><span style="font-family: 'Segoe UI',sans-serif;color: #333333"><span class="SpellE">W</span></span><span style="font-family: 'Segoe UI',sans-serif;color: #333333">e will go over a step-by-step demonstrating how to save a network capture in ETL file including a bonus of adding a time stamp and maximum size of 512 MB circular:</span></p>
<p class="MsoNormal" style="line-height: normal"><b><u><span style="font-size: 12.0pt;font-family: 'Segoe UI',sans-serif;color: #333333">Define Timestamp variable</span></u></b><u><span style="font-size: 12.0pt;font-family: 'Segoe UI',sans-serif;color: #333333">
</span></u><span style="font-family: 'Segoe UI',sans-serif;color: #333333">This is going to be to append to the output ETL capture file.</span></p>
<p style="line-height: normal"><em><span style="font-size: 10.0pt;font-family: 'Courier New';color: #333333">PS C:\&gt; $timestamp = Get-Date -f yyyy-MM-dd_HH-mm-ss</span></em><span style="font-family: 'Segoe UI',sans-serif;color: #333333">
</span></p>
<p class="MsoNormal" style="line-height: normal"><b><span style="font-family: 'Segoe UI',sans-serif;color: #333333">Note:</span></b><span style="font-family: 'Segoe UI',sans-serif;color: #333333"> PS commands listed below work with Windows 8.1 / Windows Server 2012 R2 and earlier Windows versions.</span></p>
<p class="MsoNormal" style="line-height: normal"><b><u><span style="font-size: 12.0pt;font-family: 'Segoe UI',sans-serif;color: #333333">Create a new Session1
</span></u></b><span style="font-family: 'Segoe UI',sans-serif;color: #333333">Now let's define the new capture session adding computer name and timestamp to the ETL file being created</span></p>
<p class="MsoNormal" style="line-height: normal"><i><span style="font-size: 10.0pt;font-family: 'Courier New';color: #333333">PS C:\&gt; New-<span class="SpellE">NetEventSession</span> -Name Session1 -<span class="SpellE">LocalFilePath</span> c:\$env:computername-netcap-$timestamp.etl -<span class="SpellE">MaxFileSize</span> 512</span></i></p>
<p class="MsoNormal" style="line-height: normal"><i><span style="font-size: 10.0pt;font-family: 'Courier New';color: #333333">Name               : Session1
<span class="SpellE">CaptureMode</span>        : <span class="SpellE">SaveToFile</span>
<span class="SpellE">LocalFilePath</span>      : c:\W10LAB-netcap-2017-04-26_19-45-17.etl
<span class="SpellE">MaxFileSize</span>        : 512 MB
<span class="SpellE">TraceBufferSize</span>    : 0 KB
<span class="SpellE">MaxNumberOfBuffers</span> : 0
<span class="SpellE">SessionStatus</span>      : <span class="SpellE">NotRunning</span></span></i></p>
<p class="MsoNormal" style="line-height: normal"><b><u><span style="font-size: 12.0pt;font-family: 'Segoe UI',sans-serif;color: #333333">Adding provider </span></u></b><u><span style="font-size: 12.0pt;font-family: 'Segoe UI',sans-serif;color: #333333">
</span></u><span style="font-family: 'Segoe UI',sans-serif;color: #333333">In this case is necessary add the associated GUID to this provider "Microsoft-Windows-NDIS-<span class="SpellE">PacketCapture</span>" or use Add-NetEventpacketCaptureProvider:</span></p>
<p class="MsoNormal" style="line-height: normal"><i><span style="font-size: 10.0pt;font-family: 'Courier New';color: #333333">PS C:\&gt; <span class="pl-c1">Add-NetEventPacketCaptureProvider</span><span> </span><span class="pl-k">-</span><span>SessionName Session1 </span></span></i><span style="font-size: 10.0pt;font-family: 'Courier New';color: #333333"></span></p>
<p class="MsoNormal" style="line-height: normal"><b><u><span style="font-size: 12.0pt;font-family: 'Segoe UI',sans-serif;color: #333333">Starting a Network Capture Session
</span></u></b><span style="font-family: 'Segoe UI',sans-serif;color: #333333">Now it is time to start the network capture by running:
</span></p>
<p class="MsoNormal" style="line-height: normal"><em><span style="font-size: 10.0pt;font-family: 'Courier New';color: #333333">PS C:\&gt; Start-<span>NetEventSession -Name Session1</span></span></em></p>
<p class="MsoNormal" style="margin-bottom: .0001pt;line-height: normal"><b><u><span style="font-size: 12.0pt;font-family: 'Segoe UI',sans-serif;color: #333333">Check status of the capture</span></u></b><b><span style="font-family: 'Segoe UI',sans-serif;color: #333333">
</span></b><span style="font-family: 'Segoe UI',sans-serif;color: #333333">Ensure the capture is running the command below and check last output line named <em>SessionStatus</em>:</span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt;line-height: normal"><i><span style="font-size: 10.0pt;font-family: 'Courier New';color: #333333">PS C:\&gt; Get-<span class="SpellE">NetEventSession</span></span></i></p>
<p class="MsoNormal" style="margin-bottom: .0001pt;line-height: normal"><i><span style="font-size: 10.0pt;font-family: 'Courier New';color: #333333">Name              : Session1
<span class="SpellE">CaptureMode</span>       : <span class="SpellE">SaveToFile</span>
<span class="SpellE">LocalFilePath</span>     : c:\W10LAB-netcap-2017-04-26_19-45-17.etl
<span class="SpellE">MaxFileSize</span>       : 512 MB
<span class="SpellE">TraceBufferSize</span>    : 64 KB
<span class="SpellE">MaxNumberOfBuffers</span> : 30
<strong><span class="SpellE">SessionStatus</span>      : Running</strong></span></i></p>
<p class="MsoNormal" style="line-height: normal"><b><u><span style="font-size: 12.0pt;font-family: 'Segoe UI',sans-serif;color: #333333">Stopping the Capture</span></u></b><u><span style="font-size: 12.0pt;font-family: 'Segoe UI',sans-serif;color: #333333">
</span></u><span style="font-family: 'Segoe UI',sans-serif;color: #333333">After sometime running your capture, you can stop the capture just run the following:
</span><i><span style="font-size: 10.0pt;font-family: 'Courier New';color: #333333">PS C:\&gt; Stop-<span class="SpellE">NetEventSession</span> -Name Session1</span></i><i><span style="font-family: 'Courier New';color: #333333"></span></i></p>
<p class="MsoNormal" style="line-height: normal"><b><u><span style="font-size: 12.0pt;font-family: 'Segoe UI',sans-serif;color: #333333">Remove the Session
</span></u></b><span style="font-family: 'Segoe UI',sans-serif;color: #333333">Now you can start over the whole thing by removing the session and making other customizations or if you need to start a new file with a new timestamp.<b>
</b></span><i><span style="font-size: 10.0pt;font-family: 'Courier New';color: #333333">PS C:\&gt; Remove-<span class="SpellE">NetEventSession</span> -Name session1 </span></i></p>
<p class="MsoNormal" style="line-height: normal"><span style="font-family: 'Segoe UI',sans-serif;color: #333333"><strong>Note:</strong> Script has been posted in this GitHub Repository (<a href="https://github.com/dmauser/PS-Network-Capture/blob/master/Basic-Net-Capture.ps1"><strong class="final-path">Basic-Net-Capture.ps1</strong></a>) for your reference. Some updates will be incorporated based on feedback.</span></p>
<b><u><span style="font-family: 'Segoe UI',sans-serif;color: #333333">Final Considerations
</span></u></b><span style="font-family: 'Segoe UI',sans-serif;color: #333333">We can re-use the same session by starting the capture again using <i>Start-<span class="SpellE">NetEventSession</span>-Name Session1 </i>but keep in mind we defined the timestamp of the output file on the <i>New-<span class="SpellE">NetEventSession</span>. </i>In order to create a new timestamp file, you need to remove Sesson1 and re-created it again. You can also figure out other ways to do that and feel free post in the comments below. I hope you learnt something new today.</span>

</div>]]></content:encoded>
    </item>
  </channel>
</rss>