Archive

Archive for March, 2010

Which is the Default IP in Windows 2008 R2 Multi-IP Config?

March 27th, 2010 Justin Braun 3 comments

I ran into an interesting problem this weekend.  I noticed that a lot of email was being returned as non-deliverable from my Exchange 2010 server.  Many domains, specifically AOL and some of the major ISPs require that the domains they communicate have mail servers with reverse zone lookups, meaning that their name “mail.domain.com” for example, resolves to a specific IP.  Well, my MX record does reverse resolve to the correct IP, however that IP wasn’t the IP address that my server was communicating from.

My infrastructure goes through a firewall.  It used to be Microsoft ISA Server, but recently I have been trying the new Forefront Threat Management Gateway.  One of the nice things is TMG is supported on Windows 2008 and R2, and can be virtualized as well.  I built mine on Windows 2008 R2, which appears to be part of my identity problem, at least as far as other domains are concerned.

Normally on a network card that has multiple IP addresses assigned to it, the first IP listed will be the one that is used for communication.  In the case of Windows 2008 (and R2), it actually changes to use the lowest IP address (number-wise).  So if my IP ends with 12, and another one ends with 14, even though 14 might be listed first, it will always use 12.  From what I understand and without getting into too much detail, there is something called strong and weak host models.  It’s hardcore networking, so if you want, you can read more here and here.

Microsoft recognized this as an issue and released a hotfix for Windows 2008 SP2 and Vista SP2, but the hotfix doesn’t cover R2.  Basically this hotfix adds a parmeter called SkipAsSource which can be set per interface via NETSH.  After you install this hotfix, you can create IP version 4 (IPv4) addresses or IP version 6 (IPv6) addresses by using the netsh command together with the new "skipassource" flag. By using this flag, the added new addresses are not used for outgoing packets unless explicitly set for use by outgoing packets. Therefore, these IP addresses will not be registered on the DNS servers.  This also induces the behavior as you knew it in Windows 2003.

Now, since I am running R2, this really didn’t help me, but a slight change in configuration in TMG did.  In the Networking configuration inside TMG, I have a rule for anything accessing the Internet.  I can control from here what IP is used to talk to the Internet; this would be the IP address that my mail server would be seen as through Network Address Translation (NAT) on its way to the interwebs.

image

You can configure the NAT rule to use any or all of your externally routable IP addresses.  Problem resolved!

Categories: Windows Server Tags:

Hidden Windows 7 Themes

March 27th, 2010 Justin Braun No comments

I came across this one this week.  Did you know there are a few hidden themes built-in to Windows 7?  They’re in a hidden directory, so you’ll have to type their path directly or use search with the option to location hidden files or folders.

If you navigate to C:\Windows\Globalization\MCT you’ll find several different directories.  Inside of each of those folders is a directory called “Theme”.  If you open that folder, you’ll see a .theme file which you can double-click to activate the theme.  My favorite is the UK theme.

Categories: Windows Tags:

Windows Experience Index – Parallels vs. Fusion: How Do They Stack Up?

March 18th, 2010 Justin Braun 3 comments

Since the release of Parallels 5 I have been a huge fan.  Previous to that, I really liked VMware Fusion as the product was much more mature and seemed more stable.  I really had no means to measure performance other than to gauge it by my perception over regular use.

Earlier this week, VMware announced their VMware Fusion 3.1 beta, which I had to run out and try.  I like to keep tabs on both of these products and am always curious when either of them releases an update.

That being said, I downloaded the beta ad built up a new Windows 7 virtual machine, installed the machine additions and played around a little bit.

In the past I’ve done things like measure the boot time for the operating system on each product and in most cases Parallels topped Fusion.  Especially after Parallels released version 5, the gap between those numbers seemed to grow especially when it came to the amount of time it takes to come back on a resume.

As part of my test I also built a new Parallels virtual machine with Windows 7 installed.  I thought an equal way to measure the differences would be by running the tests that provide the results of the Windows Experience Index.  The scale of the Windows Experience Index ranges from 1.0 to 5.9. A higher base score generally means that your computer will perform better and faster than a computer with a lower base score, especially when performing more advanced and resource-intensive tasks.

This host hardware was an iMac with a Core 2 Duo 2.8 GHz processor and equipped with 4 GB of RAM.  Each virtual machine (although not ran simultaneously) had 1 GB of RAM allocated to it.

So, how did each virtual machine fair?  I was actually very surprised.  As VMware has touted lots of improvements around its graphics driver and performance, it actually seemed slower than the 3.0 release.

Here’s how the numbers stacked up:

VMware Fusion Results:

fusion

Parallels Desktop Results:

fusion

Interestingly enough, it seems that Parallels does a better job in more of the categories than not.  Parallels implementation and support of Aero in Windows 7 seems to be more solid as well.

What has your experience been with these products?  Have you found the optimal virtual machine configuration on your Mac?

Categories: Mac, Virtualization Tags:

Using Excerpts in WordPress

March 11th, 2010 Justin Braun No comments

I was working on making some adjustments to a new theme in WordPress tonight and was looking for a way to check to see if a excerpt had been specified for a particular post.  When I am creating posts with code snippets in them, I really don’t want all the inline code to show in the excerpt of the post, instead, it should all be rendered when the post is opened.

Seeing as I am fairly new to PHP, I had to do some searching so I wasn’t able to craft a solution easily myself.  I found just what I was looking for over at juliaholland.org.

Categories: Development Tags:

Search Your Compellent Storage Center Using Windows PowerShell

March 3rd, 2010 Justin Braun No comments

Using Windows PowerShell and the Compellent Storage Center Command Set for PowerShell, I have created a simple script that performs searches for server and volume objects providing results of each in addition to their related mappings.  This can be helpful if you have multiple levels of server or volume folders.

# Name:       Storage Center Search
# Usage:      Search for volume or server objects across a Storage Center
# Author:     Justin Braun
# Date:              February 17, 2010

# This sample script is provided "as is" with no warranty whatsoever; 
# you assume all responsibilty of the consequences of use.

$scname = Read-Host "What Storage Center do you want to search? (IP or hostname)"
$scusername = Read-Host "What is the username for your account on this Storage Center?"
$scpassword = Read-Host -AsSecureString -Prompt "What is the password?"
$findsource = Read-Host "What type of object are you looking for? (S=server, V=volume)"
$searchterm = Read-Host "Enter the text you want to search for (wildcards OK)"

if($findsource -ne "S" -and $findsource -ne "V")
{
       # Invalid parameter entered.
       Write-Host "`nInvalid search source specified.`n" -ForegroundColor Red
       Break
}

# Valid parameter found - start script

# Instantiate connection
Write-Host "`nOpening connection...";

try
{
       $conn = Get-SCConnection -HostName $scname -User $scusername -Password $scpassword;
}
catch
{
       Write-Host "Error: " $_;
       Break;
}

Write-Host "Connection established to $scname...";

# What are we searching for?
switch ($findsource)
{
       "S"
       {
              # Find a server
              $servers = Get-SCServer -Connection $conn | where { $_.Name -like $searchterm }

              if($servers -ne $null)
              {
                     # Found some objects that might match
                     Write-Host "`nThe following servers might match your query:"
                     $servers | ft -AutoSize Name, LogicalPath, WorldWideNames
              }
              else
              {
                     # No objects found
                     Write-Host "`nSorry, no objects were found that match your query."
              }
       }

       "V"
       {
              # Find a volume
              $vols = Get-SCVolume -Connection $conn | where { $_.Name -like $searchterm }

              if($vols -ne $null)
              {
                     # Found some objects that might match
                     Write-Host "`nThe following volumes might match your query:"

                     foreach($vol in $vols)
                     {
                           # Create an output object for table formatting
                           $obj = new-Object PSObject;

                           # Add member properties with their name and value pair
                           $obj | Add-Member NoteProperty VolumeName($vol.Name);
                           $obj | Add-Member NoteProperty LogicalPath($vol.LogicalPath);

                           #Get Mappings to volume
                           $mappings = Get-SCVolumeMap -VolumeIndex $vol.Index -Connection $conn

                           if($mappings -ne $null)
                           {
                                  $maps = ""
                                  foreach($mapping in $mappings)
                                  {
                                         $maps += $mapping.ServerName + " "
                                  }

                                  $obj | Add-Member NoteProperty Mappings($maps);
                           }
                           else
                           {
                                  # No mappings found
                                  $obj | Add-Member NoteProperty Mappings("None");
                           }

                           # Write the output to the screen
                           Write-Output $obj;
                     }
              }
              else
              {
                     # No objects found
                     Write-Host "`nSorry, no objects were found that match your query."
              }
       }
}

If you have ideas for scripts or would like to share your creations with other Compellent customers, check out the Forums at the Compellent Customer Portal. [authentication required]

Categories: Compellent, PowerShell, Scripting Tags: