Thursday, August 27, 2015

Microsoft Message Analyzer and FiddlerCore

Microsoft Message Analyzer comes with a favorite scenario called "Pre-Encryption for HTTPS" scenario. The scenario relies on the FiddlerCore library. Due to a license issue, Microsoft does not ship the library with the analyzer. So when you try to use the scenario, you would encounter an error with the message below,

The Message Analyzer WebProxy provider depends on the FiddlerCore
library. The FiddlerCore library belongs to Telerik, Inc. and must be
installed separately. Please visit
http://www.telerik.com/fiddler/fiddlercore to download the
FiddlerCore installer and library from Telerik. A restart of Message
Analyzer is not necessary. 

Below is a screen capture.


To solve the issue, we simply download and install the FiddlerCore library, at present, from this URL.  The remaining issue is to determine where to install the FiddlerCore library. By default, FiddlerCore installer installs the library under the directory where the installer is. The directory would be a wrong directory for Microsoft Message Analayzer. To work with FiddlerCore, Microsoft Message Analyzer requires the FiddlerCore library to be installed under the directory of Microsoft Message Analyzer. If you install Microsoft Message Analyzer using its default installation directory, the FiddlerCore library's installation directory should be,

C:\Program Files\Microsoft Message Analyzer\FiddlerCoreAPI
If you are running 32-bit Windows or you installed 32-bit Microsoft Message Analyzer on its default installation directory, the directory to install the FiddlerCore library should be,

C:\Program Files (x86)\Microsoft Message Analyzer\FiddlerCoreAPI

Below is a captured FiddlerCore library installer screen shot that shows the correct installation directory is entered,


To configure and run a Pre-Encryption for HTTPS trace, see Microsoft Technet article Using the Network Tracing Features.

Friday, August 7, 2015

Configuring VMWare Player Virtual Networks

When we use VMWare Player to run guest operating systems, we sometimes want to automatically configure guest operating systems, such as, to assign fixed IP addresses to guest operating systems based on guest systems' network interfaces' MAC addresses.

This post discusses two items,
  1. to assign fixed IP address to interfaces of guest systems via VMWare's DHCP server
  2. and to change virtual subnet setting for virtual Ethernet segments using the vmnetcfg tool

Assigning Fixed IP Address


VMWare Player comes with a DHCP server that allows the guest systems to automatically configure their IP network settings. By configuring the DHCP server, we can achieve the auto-configuration purpose.

On Windows hosts, the configuration file of the DHCP server is located at directory %ProgramData%\VMWare. As an example, I show the value of  %ProgramData%\VMWare below,



C:>echo %ProgramData%\VMWare
C:\ProgramData\VMWare



In the directory is the configuration file, i.e., vmnetdhcp.conf. We can add host entries to the configuration file to assign fixed IP addresses to guest operating systems. Below is an example that assigns IP address 192.168.101.127 to MAC address 00:0c:29:22:12:4c in the virtual Ethernet segment 8.



# Virtual ethernet segment 8
# Added at 08/06/15 10:57:08
subnet 192.168.101.0 netmask 255.255.255.0 {
range 192.168.101.128 192.168.101.254;            # default allows up to 125 VM's
option broadcast-address 192.168.101.255;
option domain-name-servers 192.168.101.2;
option domain-name "localdomain";
option netbios-name-servers 192.168.101.2;
option routers 192.168.101.2;
default-lease-time 1800;
max-lease-time 7200;
}
host VMnet8 {
    hardware ethernet 00:50:56:10:00:01;
    fixed-address 192.168.101.1;
    option domain-name-servers 0.0.0.0;
    option domain-name "";
    option routers 0.0.0.0;
}

host Ubuntu {
    hardware ethernet 00:0c:29:22:12:4c;
    fixed-address 192.168.101.127;
    option domain-name-servers 192.168.101.2;
    option domain-name "";
    option routers 192.168.101.2;
} 


Changing Virtual Subnet Setting

One particular problem I often encounter is that the IP subnet setting is always changed when I upgrade or reinstall VMWare Player. For instance, in the above IP assignment example, the virtual Ethernet segment 8 is assigned a subnet of 192.168.101.0 with net mask 255.255.255.0 (i.e., 192.168.101.0/24); however, when I reinstall VMWare Player, the Ethernet segment 8's subnet assignment may become 192.168.157.0 with net mask 255.255.255.0 or some other value.

A simple method to change the Ethernet segment's subnet assignment back to the original value or any other valid value is to use the vmnetcfg tool.

The vmnetcfg tool is a part of VMWare Workstation; however, it does not come with VMWare Player. Since we can download VMWare Workstation trial version from VMWare's website, we can extract the tool from the installation package and use it with VMWare Player.

Two excellent posts that helped me and detail how one may extract the vmnetcfg tool from VMWare Workstation installation package and how one may use the tool to reassign a subnet to a virtual Ethernet segment are,

  1. Download vmnetcfg.exe & vmnetcfglib.dll for VMware Player 6.x & 7.x
  2. VMWare Interfaces Tutorial
For the impatient, the user interface of the vmnetcfg tool looks as follows,



It is obvious that one can change the subnet assignment to a selected virtual Ethernet segment.