<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>NicolBlog : Routing</title><link>http://blogs.msdn.com/nicold/archive/tags/Routing/default.aspx</link><description>Tags: Routing</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>How to use Hyper-V with a wireless network connection</title><link>http://blogs.msdn.com/nicold/archive/2008/04/15/how-to-use-hyper-v-with-a-wireless-network-connection.aspx</link><pubDate>Tue, 15 Apr 2008 12:53:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8397150</guid><dc:creator>NicolD</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/nicold/comments/8397150.aspx</comments><wfw:commentRss>http://blogs.msdn.com/nicold/commentrss.aspx?PostID=8397150</wfw:commentRss><description>&lt;p&gt;Hyper-V, the fantastic Windows Server 2008 new feature have a small limit I discovered when on my &amp;quot;home/handmade server:-)&amp;quot; I tried to use it. It doesn't manage wireless networks. This is &amp;quot;by design&amp;quot;, as clearly described by &lt;a href="http://blogs.msdn.com/virtual_pc_guy/archive/2008/01/09/using-hyper-v-with-a-wireless-network-adapter.aspx" target="_blank"&gt;Ben Armstrong in his blog&lt;/a&gt;. This absolutely make sense because Windows Server 2008 and Hyper-V is a server oriented product.&lt;/p&gt;  &lt;p&gt;Despite of this, there are scenarios I can define &amp;quot;&lt;em&gt;consumer&lt;/em&gt;&amp;quot; or &amp;quot;&lt;em&gt;Lab&lt;/em&gt;&amp;quot; oriented where allow to Hyper-V to interact with a wireless network can be required. The scenarios list include:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;A test server at home connected via wireless to both Internet and other home PCs via a SOHO router (my scenario :-) &lt;/li&gt;    &lt;li&gt;A server machine used on a live/conference demo connected to the speaker's PC via wireless&amp;#160; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;For these scenarios, we can identify following connectivity requirements:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;to allow to guest machine (on Hyper-V) to access to Internet &lt;/li&gt;    &lt;li&gt;to allow to guest machine to access to other machines connected to wireless LAN &lt;/li&gt;    &lt;li&gt;to allow to other machines connected to the wireless LAN to access to guest machine &lt;/li&gt;    &lt;li&gt;to allow to guest machine to be exposed and accessed from Internet &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;The great &lt;a href="http://blogs.msdn.com/virtual_pc_guy/archive/2008/01/09/using-hyper-v-with-a-wireless-network-adapter.aspx" target="_blank"&gt;Ben's post on this topic&lt;/a&gt;, address just the scenario (1) leaving other not covered. Objective of this post is to show a configuration that allow to address all above requirement in 15 minutes or less:-)&lt;/p&gt;  &lt;p&gt;--&lt;/p&gt;  &lt;p&gt;Well, Hyper-V allows to create &amp;quot;&lt;strong&gt;Internal Virtual Networks&lt;/strong&gt;&amp;quot; (IVN). These IVN are networks visible from both HOST and GUEST operating systems. In example if I have an internal virtual network called &amp;quot;&lt;strong&gt;RoI&lt;/strong&gt;&amp;quot; (Route over Internet:-) on my host machine (i.e. &lt;strong&gt;SRV04.local&lt;/strong&gt;) and the this network is shared with 3 guest machines (&lt;strong&gt;GUEST01.local&lt;/strong&gt;, &lt;strong&gt;GUEST02.local&lt;/strong&gt;, &lt;strong&gt;GUEST03.local&lt;/strong&gt;), I'll have a &amp;quot;virtual&amp;quot; network topology as shown below:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/nicold/WindowsLiveWriter/HowtouseHyperVwithawirelessnetworkconnec_FBC5/image_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="207" alt="image" src="http://blogs.msdn.com/blogfiles/nicold/WindowsLiveWriter/HowtouseHyperVwithawirelessnetworkconnec_FBC5/image_thumb.png" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;In order to create a new virtual internal network switch you have to:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Open the Hyper-V Manager and select your server. &lt;/li&gt;    &lt;li&gt;Select &lt;strong&gt;Virtual Network Manager...&lt;/strong&gt; from the action pane (on the right). &lt;/li&gt;    &lt;li&gt;Select &lt;strong&gt;New virtual network&lt;/strong&gt; and choose to &lt;strong&gt;Add&lt;/strong&gt; an &lt;strong&gt;Internal&lt;/strong&gt; network. &lt;/li&gt;    &lt;li&gt;Give the new virtual network the name you want hit &lt;strong&gt;OK&lt;/strong&gt;. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Because &lt;strong&gt;SRV04.local&lt;/strong&gt; have a wireless network card too, &lt;strong&gt;SRV04.local&lt;/strong&gt; now have 2 network cards. Through this second network card, it is able connect to wireless network (WIRELESS) that allows it to interact with both other PC connected via wireless and to Internet.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/nicold/WindowsLiveWriter/HowtouseHyperVwithawirelessnetworkconnec_FBC5/image6.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="244" alt="image" src="http://blogs.msdn.com/blogfiles/nicold/WindowsLiveWriter/HowtouseHyperVwithawirelessnetworkconnec_FBC5/image6_thumb.png" width="159" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Now, in order to allow to GUEST machines to interact with both machines connected to wireless LAN AND Internet we can enable HOST machine (&lt;strong&gt;SRV04.local&lt;/strong&gt;) &lt;u&gt;to act as a router&lt;/u&gt;.&lt;/p&gt;  &lt;p&gt;Windows Server 2008 have a standard role called &amp;quot;&lt;strong&gt;Network Policy and Access Service&lt;/strong&gt;&amp;quot; that can be activated to allow this kind of scenario.&lt;/p&gt;  &lt;p&gt;Before to proceed, in order to simplify the discussion, let's assume to use following network configuration:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;WIRELESS LAN&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;IP Range: &lt;strong&gt;192.168.&lt;font color="#ff0000"&gt;1&lt;/font&gt;.x&lt;/strong&gt; (1&amp;lt;= x &amp;lt;=255) &lt;/li&gt;    &lt;li&gt;Subnet Mask: &lt;strong&gt;255.255.255.0&lt;/strong&gt; &lt;/li&gt;    &lt;li&gt;DNS == Default Gateway == &lt;strong&gt;192.168.1.1&lt;/strong&gt; &lt;/li&gt;    &lt;li&gt;Wireless LAN is private and router act as a &lt;a href="http://en.wikipedia.org/wiki/Network_address_translation" target="_blank"&gt;NAT&lt;/a&gt; to allow local machines to access Internet. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;RoI LAN&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;IP Range: &lt;strong&gt;192.168.&lt;font color="#ff0000"&gt;2&lt;/font&gt;.x&lt;/strong&gt; (1&amp;lt;= x &amp;lt;=255) &lt;/li&gt;    &lt;li&gt;Subnet Mask &lt;strong&gt;255.255.255.0&lt;/strong&gt; &lt;/li&gt;    &lt;li&gt;DNS: &lt;strong&gt;192.168.1.1&lt;/strong&gt; &lt;/li&gt;    &lt;li&gt;Default Gateway: &lt;strong&gt;192.168.2.6&lt;/strong&gt; (SRV04 machine on RoI LAN!)&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;SRV04&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;IP on Wireless LAN: &lt;strong&gt;192.168.1.6&lt;/strong&gt; &lt;/li&gt;    &lt;li&gt;IP on RoI LAN: &lt;strong&gt;192.168.2.6&lt;/strong&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://blogs.msdn.com/blogfiles/nicold/WindowsLiveWriter/HowtouseHyperVwithawirelessnetworkconnec_FBC5/image_6.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="241" alt="image" src="http://blogs.msdn.com/blogfiles/nicold/WindowsLiveWriter/HowtouseHyperVwithawirelessnetworkconnec_FBC5/image_thumb_2.png" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Steps required to allow &lt;strong&gt;GUEST01.local&lt;/strong&gt; to access to Internet are following:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;enable and configure &amp;quot;&lt;strong&gt;Network Policy and Access Service&lt;/strong&gt;&amp;quot; on &lt;strong&gt;SRV04.local&lt;/strong&gt; &lt;/li&gt;    &lt;li&gt;add a &lt;strong&gt;static route&lt;/strong&gt; on &amp;quot;default gateway&amp;quot; router &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Step1: how to configure/enable &amp;quot;Network Policy and Access Service&amp;quot;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;From &lt;strong&gt;Server Manager&lt;/strong&gt;, select &amp;quot;&lt;strong&gt;Add Role&lt;/strong&gt;&amp;quot;.&lt;/p&gt;  &lt;p&gt;Select &amp;quot;&lt;strong&gt;Network Policy and Access Service&lt;/strong&gt;&amp;quot;, then click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/nicold/WindowsLiveWriter/HowtouseHyperVwithawirelessnetworkconnec_FBC5/Capture01.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="174" alt="Capture01" src="http://blogs.msdn.com/blogfiles/nicold/WindowsLiveWriter/HowtouseHyperVwithawirelessnetworkconnec_FBC5/Capture01_thumb.jpg" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Select &amp;quot;&lt;strong&gt;Remote Access Service&lt;/strong&gt;&amp;quot; and &amp;quot;&lt;strong&gt;Routing&lt;/strong&gt;&amp;quot; then click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/nicold/WindowsLiveWriter/HowtouseHyperVwithawirelessnetworkconnec_FBC5/Capture02.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="173" alt="Capture02" src="http://blogs.msdn.com/blogfiles/nicold/WindowsLiveWriter/HowtouseHyperVwithawirelessnetworkconnec_FBC5/Capture02_thumb.jpg" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Select &amp;quot;&lt;strong&gt;Custom Configuration&lt;/strong&gt;&amp;quot; then click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/nicold/WindowsLiveWriter/HowtouseHyperVwithawirelessnetworkconnec_FBC5/Capture03.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="203" alt="Capture03" src="http://blogs.msdn.com/blogfiles/nicold/WindowsLiveWriter/HowtouseHyperVwithawirelessnetworkconnec_FBC5/Capture03_thumb.jpg" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Select &amp;quot;&lt;strong&gt;LAN Routing only&lt;/strong&gt;&amp;quot; then click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/nicold/WindowsLiveWriter/HowtouseHyperVwithawirelessnetworkconnec_FBC5/Capture04.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="202" alt="Capture04" src="http://blogs.msdn.com/blogfiles/nicold/WindowsLiveWriter/HowtouseHyperVwithawirelessnetworkconnec_FBC5/Capture04_thumb.jpg" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;when finished, select &amp;quot;&lt;strong&gt;Start Service&lt;/strong&gt;&amp;quot; on server manager.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/nicold/WindowsLiveWriter/HowtouseHyperVwithawirelessnetworkconnec_FBC5/Capture05.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="119" alt="Capture05" src="http://blogs.msdn.com/blogfiles/nicold/WindowsLiveWriter/HowtouseHyperVwithawirelessnetworkconnec_FBC5/Capture05_thumb.jpg" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Step 2: how to configure your default gateway router&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Previous configuration is not enough to allow routing because you still need to say to your router that addresses &lt;strong&gt;192.168.2.x&lt;/strong&gt; must be forwarder to &lt;strong&gt;SRV04.local&lt;/strong&gt; machine. You can obtain this adding a &lt;u&gt;static route&lt;/u&gt; on your router. Almost every SOHO router of &amp;#8364;50 or more is able to do this, please refer to your router manual to discover how to do this.In example, at home, I have a Netgear toy that shows the following page&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/nicold/WindowsLiveWriter/HowtouseHyperVwithawirelessnetworkconnec_FBC5/Capture06.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="58" alt="Capture06" src="http://blogs.msdn.com/blogfiles/nicold/WindowsLiveWriter/HowtouseHyperVwithawirelessnetworkconnec_FBC5/Capture06_thumb.jpg" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;In our example have to add a route to &lt;strong&gt;192.168.2.0&lt;/strong&gt; mask &lt;strong&gt;255.255.255.0&lt;/strong&gt; through &lt;strong&gt;192.168.1.6&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;And that's all&lt;/font&gt;&lt;/strong&gt;! Now your guest machine can access to Internet. The cool think is that with this configuration, and thanks to your cheap:-) router too, someone from Internet can access to a service based on your &lt;strong&gt;GUEST&lt;/strong&gt; machine. In example, if you have an IIS on &lt;strong&gt;GUEST01.local&lt;/strong&gt; and you want to show it on Internet, you can use the port forwarding option of your router with following parameters:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Service/Port: &lt;strong&gt;80&lt;/strong&gt; &lt;/li&gt;    &lt;li&gt;Server IP Address: &lt;strong&gt;192.168.2.10&lt;/strong&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Again for more information on port forwarding please refer to your router instruction manual.&lt;/p&gt;  &lt;p&gt;This configuration still &lt;u&gt;doesn't&lt;/u&gt; allow:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Other machines on your wireless LAN to access to &lt;strong&gt;GUEST01.local&lt;/strong&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;GUEST01.local&lt;/strong&gt; to access other machines on your wireless LAN &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;This because machines on your wireless LAN have as default gateway &lt;strong&gt;192.168.1.1&lt;/strong&gt; and the router is not smart enough to understand that &lt;strong&gt;192.168.2.x&lt;/strong&gt; addresses must be routed to &lt;strong&gt;SRV04.local&lt;/strong&gt;. The easy solution is to add a static route on each machine connected to the wireless LAN. You can achieve this adding a static route via command prompt with the following instruction:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;route ADD 192.168.2.0 MASK 255.255.255.0 192.168.1.6&lt;/strong&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Remember that this action, on Vista, &lt;a href="http://www.home-network-help.com/requires-elevation.html" target="_blank"&gt;requires elevation&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Thanks to Marcello &amp;quot;&lt;em&gt;router&lt;/em&gt;&amp;quot; Formica for the fundamental help:-)&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8397150" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/nicold/archive/tags/Hyper-V/default.aspx">Hyper-V</category><category domain="http://blogs.msdn.com/nicold/archive/tags/Routing/default.aspx">Routing</category></item></channel></rss>