<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Carlos&#039; Corner &#187; networking</title>
	<atom:link href="http://cars.lostroncos.org/tag/networking/feed/" rel="self" type="application/rss+xml" />
	<link>http://cars.lostroncos.org</link>
	<description>The tired geek-dad in the corner</description>
	<lastBuildDate>Wed, 12 May 2010 19:46:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Simulating a more interesting environment with Vyatta and VMware ESXi &#8211; pt 2</title>
		<link>http://cars.lostroncos.org/2010/02/18/a-more-interesting-environment-with-vyatta-and-vmware-pt2/</link>
		<comments>http://cars.lostroncos.org/2010/02/18/a-more-interesting-environment-with-vyatta-and-vmware-pt2/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 22:37:37 +0000</pubDate>
		<dc:creator>cars</dc:creator>
				<category><![CDATA[Home Lab]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[vyatta]]></category>
		<category><![CDATA[ESX]]></category>
		<category><![CDATA[esxi]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[routing]]></category>

		<guid isPermaLink="false">http://cars.lostroncos.org/?p=343</guid>
		<description><![CDATA[<p>In an earlier post I went through the process of coming up with a solution to be able to test an Exchange 2003 to Exchange 2010 migration using VMs. In order to simulate a multi-site AD environment I wanted to use Vyatta based routers to create my network infrastructure. In this post I&#8217;ll actually walk [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://cars.lostroncos.org/2010/02/17/a-more-interesting-environment-with-vyatta-and-vmware/">In an earlier post</a> I went through the process of coming up with a solution to be able to test an Exchange 2003 to Exchange 2010 migration using VMs. In order to simulate a multi-site AD environment I wanted to use Vyatta based routers to create my network infrastructure. In this post I&#8217;ll actually walk through the process of setting up the ESX and theinternal router. In the next post(s) I&#8217;ll go into configuring the DMZ and internet routers and firewalls. As a reminder the environment I want to set up will look like this&#8230;</p>
<p><a rel="lightbox[100]" href="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga8.png"><img class="alignnone size-medium wp-image-299" title="Final Environment" src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga8-300x139.png" alt="Final Environment" width="300" height="139" /></a>.</p>
<p>In order to actually be able to implement this I first had to go configure the appropriate networking configuration on each of the ESXi hosts.</p>
<p>First I needed to create a virtual switch utilizing the NIC attached to the crossover cable. This is done by going to the &#8220;Configuration&#8221; tab for the ESX host within the vSphere Client.</p>
<p><a rel="lightbox[21]" href="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part21.png"><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part21.png" alt="" width="535" height="176" /></a></p>
<p>Clicking the &#8220;Add Networking&#8221; option will walk one through the wizard to configure the new switch. I started by choosing &#8220;Virtual Machine&#8221; on the Connection Type Screen.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part22.png" alt="" /></p>
<p>On the next page I choose to create a new virtual switch and pick the appropriate physical NIC that will be used to communicate with the other host. (If I had the capacity to put all the VMs one one host I could create the vSwitch without having to specify a network adapter)</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part23.png" alt="" /></p>
<p>Then I created an initial Port Group and specified a VLAN ID for it. In this case for the Remote Site (192.168.3.X/24) I&#8217;m specifying VLAN ID 23.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part24.png" alt="" /></p>
<p>Once completed the new virtual switch should look similar to the one shown below.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part25.png" alt="" /></p>
<p>Now that the vSwitch has been created, I can add port groups for the other networks: DMZ (192.168.254.X), Internet (10.0.0.X) and HQ(192.168.2.X).  Each one of these should have a unique VLAN ID associated with it which is also used when these port groups get created on the second host.</p>
<p><span id="more-343"></span></p>
<p>In addition I need to add port groups for the network between the DMZ and Internet router (192.168.5.X), as well as the one between the internal router and the DMZ (192.168.4.X). Because I&#8217;ll put all three routers on the same host, these last two port groups need only exist on that one host.</p>
<p>When all is said and done there should be 6 port groups defined on the vSwitch on the host where I&#8217;ll put the routers and 4 port groups on the other host. Notice that the VLAN IDs for each network match up across the two switches.</p>
<p><a rel="lightbox[26]" href="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part26.png"><img title="Completed vSwitch Configs" src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part26.png" alt="" width="544" height="349" /></a></p>
<p>I initially tried this setup using an alpha version 6 of Vyatta but the routers felt a little slow to me (though I have no empirical evidence to back that up) so I went back to using version 5 LiveCDs for the routers as discussed in the earlier entry.</p>
<h2>Building the internal router</h2>
<p>I started by creating a custom VM for the internal or home router with 4 network adapters configured. I used the custom configuration because this VM won&#8217;t actually have a virtual hard disk. The four network adapters will be attached to my home LAN (lostroncos_01), the HQ Site Network, the Remote Site Network and the intranet to DMZ network. (Note: <a href="http://cars.lostroncos.org/2008/09/18/using-vyatta-with-vmware/">This post has a more detailed description</a> of the process I used to create Vyatta routers. )</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part27.png" alt="" /></p>
<p>After powering on the router and opening the VM console I like to enable the NIC on my home network and ssh so I can do the rest of the configuration via an ssh client such as Putty. Once the VM has initially been powered on, I can go back and look at the settings and determine the MAC address of the NIC attached to my home network (lostroncos_01) is 00:0c:29:76:e2:07. Upon logging into the VM console I can go into configure mode by entering the command &#8220;configure&#8221; and then get a list of the interfaces the router knows about by entering &#8220;show interfaces&#8221;.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part28.png" alt="" /><br />
The one I&#8217;m interested in initially configuring is eth0. I can tell because the MAC matches the one I took note of earlier. To configure it to use 192.168.1.254 as it&#8217;s address and enable ssh I can do the following:</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part29.png" alt="" /></p>
<p>Let&#8217;s look at these commands in a little more detail.</p>
<p>The  set interfaces command can take a wide variety of arguments. Here I&#8217;m specifying that I want to work on an ethernet interface. Other interface types include adsl, bonding, bridge, loopback, multilink, openvpn, serial, tunnel and wirelessmodem.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part210.png" alt="" /></p>
<p>Even after specifying the type as <strong><em>ethernet</em></strong> and the particular interface (eth0) I can still use one of several subcommands/options.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part211.png" alt="" /></p>
<p>Because I&#8217;m using VMs and a fairly generic setup I really only need to worry about the <strong><em>address</em></strong> option. So I specify the address and netmask notation by specifying the number of bits to use for the netmask (24).</p>
<p>The next command <strong><em>&#8220;set service ssh</em></strong>&#8221; simply enables the SSH server.</p>
<p>Now I&#8217;ve configured the interface and enabled SSH, but the settings haven&#8217;t been made active. That&#8217;s what the<strong><em> &#8220;commit&#8221;</em></strong> command does.</p>
<p>Executing the &#8220;<strong><em>show interfaces</em></strong>&#8221; command again I can see that the IP(v4) address is set for eth0 but not any of the other interfaces. Now I can use my ssh client to connect to the VM to finish the configuration. (One can also use the VMware console to perform all of the configuration steps, I just prefer an external SSH client).</p>
<p>After making sure the MAC addresses and networks match up the way I think they should, I can set the address for each of the other interfaces and commit the changes. Then I can exit the configuration mode by typing &#8220;<strong><em>exit</em></strong>&#8221; and save the configuration to the virtual floppy using the &#8220;<strong><em>init-floppy</em></strong>&#8221; command.  This then ensures that my configuration will survive reboots of the router.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part212.png" alt="" /></p>
<p>One of the other things than can be helpful to do is to use the &#8220;<strong><em>description</em></strong>&#8221; option with  set interfacse to provide a little more information when logged into the router.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part213.png" alt="" /></p>
<p>After doing this for each interface and then committing the changes I can see the descriptions when doing show interfaces from either the configure mode</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part214.png" alt="" /></p>
<p>Or from the actual router shell</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part215.png" alt="" /></p>
<p>Since I happen to  already have VMs on both the HQ and Remote networks I can verify basic connectivity from the router by pinging those VMs as well as my PC.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part216.png" alt="" /></p>
<p>The next trick is to validate that I can ping the HQ and Remote subnets from my physical PC. Since both of those subnets are directly connected to the router I don&#8217;t need to add any static routes on the router. However I do need to add a route on my PC to reach those subnets. Otherwise it&#8217;ll try to use the default gateway out to my ISP (as shown below) which doesn&#8217;t know anything about this lab environment.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part217.png" alt="" /></p>
<p>To reach the 192.168.[2,3,4] subnets I want to use the interface on rtr-home that&#8217;s attached to my home network (192.168.1.254). So using the &#8220;<strong><em>route</em></strong>&#8221; command from a command prompt on my Windows7 machine I can add the route to 192.168.4.X.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part218.png" alt="" /></p>
<p>The route command in this case takes a few arguments…</p>
<p style="margin-left: 27pt">#1 <strong><em>add </em></strong>tells route I&#8217;m adding a new one</p>
<p style="margin-left: 27pt">#2 Next I specify the destination, and since ultimately I&#8217;m trying to get to a subnet we&#8217;ll specify <strong><em>192.168.4.0</em></strong>.</p>
<p style="margin-left: 27pt">#3 &amp; #4 <strong><em>MASK </em></strong>says the next argument is the netmask relative to the destination</p>
<p style="margin-left: 27pt">#5 is the gateway for this destination, in this case the interface on my virtual router that&#8217;s attached to the home network.</p>
<p>Once that&#8217;s done I can then try to ping &amp; tracert the 192.168.4.2 interface on the router again.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part219.png" alt="" /><br />
<img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part220.png" alt="" /></p>
<p>Executing the <strong><em>&#8220;route print&#8221;</em></strong> command from the Command Prompt  I can see the entry for the 192.168.4.X network as I would expect.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part221.png" alt="" /></p>
<p>Now that this particular routing entry appears to be working properly I can re-run the route command with the <strong><em>-p</em></strong> option so that it&#8217;s persistent across reboots of my home PC.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part222.png" alt="" /><br />
Next I need to add routes for the 192.168.2.X and 192.168.3.X networks to the PC as well.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part223.png" alt="" /></p>
<p>At this point, I can try to do a traceroute from my PC to the VM on the HQ Site network that I was able to ping earlier from the router.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part224.png" alt="" /><br />
Because I&#8217;m occasionally paranoid, the next step for me was to connect to the console of the VMs on the HQ (shown below) and Remote (not shown) subnets and verify that I can ping machines on my home LAN across the internal router, rtr-home.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part225.png" alt="" /></p>
<p>At this point my internal Vyatta router is routing traffic between subnets it is directly connected to (Home LAN, the HQ Site and Remote Site). Once the DMZ and Internet routers are set up some changes will need to be made on the internal router to get traffic to those non-connected subnets. I&#8217;ll go through that process in a subsequent post.</p>
<p>-crt</p>
]]></content:encoded>
			<wfw:commentRss>http://cars.lostroncos.org/2010/02/18/a-more-interesting-environment-with-vyatta-and-vmware-pt2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Simulating a more interesting environment with Vyatta and VMware ESXi</title>
		<link>http://cars.lostroncos.org/2010/02/17/a-more-interesting-environment-with-vyatta-and-vmware/</link>
		<comments>http://cars.lostroncos.org/2010/02/17/a-more-interesting-environment-with-vyatta-and-vmware/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 07:05:08 +0000</pubDate>
		<dc:creator>cars</dc:creator>
				<category><![CDATA[Exchange]]></category>
		<category><![CDATA[Home Lab]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[vyatta]]></category>
		<category><![CDATA[ESX]]></category>
		<category><![CDATA[esxi]]></category>
		<category><![CDATA[networking]]></category>

		<guid isPermaLink="false">http://cars.lostroncos.org/?p=300</guid>
		<description><![CDATA[<p>[Part 2 of this series which involves the actual configuration of the Vyatta routers is now up here -crt]</p>
<p>At work we&#8217;ve recently made the decision to migrate to Exchange 2010 from Exchange 2003. While we do have an environment that we can use for some testing of the migration it doesn&#8217;t mimic our production environment [...]]]></description>
			<content:encoded><![CDATA[<p><em>[Part 2 of this series which involves the actual configuration of the Vyatta routers is</em><a href="http://cars.lostroncos.org/2010/02/18/a-more-interesting-environment-with-vyatta-and-vmware-pt2/"><em> now up here</em></a><em> -crt]</em></p>
<p>At work we&#8217;ve recently made the decision to migrate to Exchange 2010 from Exchange 2003. While we do have an environment that we can use for some testing of the migration it doesn&#8217;t mimic our production environment closely enough for me to be comfortable using it as the sole test area. Given the changes in how Exchange 2010 (E2KX) works vs 2003 I wanted to be able to simulate multiple (2) Active Directory sites (i.e. subnets), a DMZ, and the &#8220;Internet&#8221; including some really simple firewalls.</p>
<p>I wanted to use virtual machines to go through this exercise so that I could take snapshots and repeat the various steps and/or variations of them if necessary. In order to do this I utilized the Vyatta Community Edition based routers to help create my virtual &#8220;enterprise&#8221; environment. I&#8217;ve talked about<a href="http://cars.lostroncos.org/2008/09/18/using-vyatta-with-vmware/" target="_blank"> Vyatta before in this article</a>. In this post I&#8217;ll talk a little about the process I went through to get to my final configuration (shown below).  In subsequent articles I&#8217;ll go  through the actual router and VMware configuration process.</p>
<div id="attachment_299" class="wp-caption alignnone" style="width: 830px"><a rel="lightbox[8]" href="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga8.png"><img class="size-large wp-image-299" title="Final Environment" src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga8-1024x477.png" alt="Final Environment" width="820" height="382" /></a><p class="wp-caption-text">The final environment as laid out on two interconnected servers</p></div>My lab environment at home consists of two Dell PowerEdge servers (one a PE2850, the other a 2950 each with 8Gigs of RAM). Both servers are running ESXi 4.0. Since the 2850 can&#8217;t run 64 bit VMs I was going to install the Exchange 2003 servers and Windows 2003 DCs on it. Then I&#8217;d install VMs running Server 2008R2 on the 2950 with Exchange 2010. Both servers are connected to my home network and since I was going to be using both I wanted to have some way for VMs on each host to be able to communicate with others without necessarily having all the traffic come across my home network. Since both Dells have multiple NICs I connected them with a crossover cable ending up with something like this:</p>
<p><div class="wp-caption alignnone" style="width: 504px"><img title="A physical view" src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga1.png" alt="" width="494" height="384" /><p class="wp-caption-text">Physical view of the network </p></div>
<p>In initially penciling out a plan for what I wanted to do I had nine VMs scattered across four subnets.</p>
<div class="wp-caption alignnone" style="width: 706px"><a rel="lightbox[2]" href="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga2.png"><img title="Multi-gateway subnets" src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga2.png" alt="" width="696" height="332" /></a><p class="wp-caption-text">Isolated environment with multiple gateways per subnet</p></div>Considering my limited resources and my need to keep some other unrelated VMs up and running while I&#8217;m testing, I trimmed this down to 7 by combining the Domain Controllers and Exchange 2003 servers together in the HQ and Remote subnets.</p>
<p><div class="wp-caption alignnone" style="width: 443px"><img title="Consolidating functions to reduce # of VMs" src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga3.png" alt="" width="433" height="387" /><p class="wp-caption-text">Consolidating functions to reduce # of VMs</p></div>
<p>In further looking at this from a networking perspective, I was hit with the realization the initial configuration with two routers attached to the HQ and DMZ subnets would require me to manage routing on<strong><em> each individual VM</em></strong> in each of those subnets as well as on each of the routers. As an example one can look at the Exchange 2010 server in the HQ site/subnet.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga4.png" alt="" /></p>
<p><span id="more-300"></span></p>
<p>In this particular case the Exchange server would need to be able to route some traffic to the DMZ via 192.168.2.253 and other traffic to the &#8220;Remote&#8221; site via 192.168.2.254. (If the server was going to communicate directly with machines in our fake &#8220;Internet&#8221; I&#8217;d have to add yet another routing entry.) I can of course configure a default gateway when configuring the NIC, but still have to manually add a route for the other gateway. This process then has to be repeated on each machine. It then gets more complicated if I want to be able to use Terminal Services (RDP) to connect to the VMs rather than using the VM remote console because I now have to figure out how to connect the virtual routers to my home network and potentially add yet another routing entry.</p>
<p>I decided I&#8217;d rather have a single gateway on each subnet (so I only had to specify a default gateway on each VM) and then rely on the routers to do all the routing. I considered a couple of different ways to do this. One option was do something &#8220;meshy&#8221; where the router for each subnet was connected to common shared subnet.</p>
<p><a rel="lightbox[5]" href="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga5.png"><img title="A &quot;mesh-y&quot; solution" src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga5.png" alt="" width="591" height="378" /></a></p>
<p>This would have had the desired effect a single gateway for each subnet regardless of where traffic was going, but would have required 5 virtual routers which seemed a little excessive. Going in the other direction, another option was to have a single router connected to everything.</p>
<div class="wp-caption alignnone" style="width: 626px"><a rel="lightbox[6]" href="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga6.png"><img title="Single-router solution" src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga6.png" alt="" width="616" height="336" /></a><p class="wp-caption-text">Single-router solution</p></div><a rel="lightbox[6]" href="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga6.png"><br />
</a></p>
<p>I ended up with a solution somewhere between the &#8220;mesh&#8221; and the single mongo router. It employs three routers. I decided on this partly because I wanted to keep things relatively simple especially since I was going to be enabling the firewall functionality between the DMZ and Internet (and wanting to limit the damage I could do to myself when working late at night).<br />
<a rel="lightbox[7]" href="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga7.png"><br />
<img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga7.png" alt="" width="649" height="317" /></a></p>
<p>Again, when all was said and done the environment I ended up with looks like the one below. In the next couple of entries I&#8217;ll go through the actual process of building the networking side of this.</p>
<p><div class="wp-caption alignnone" style="width: 784px"><a href="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga8.png"><img title="Physical/Logical view" src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga8.png" alt="" width="774" height="361" /></a><p class="wp-caption-text">Physical/Logical view</p></div>
]]></content:encoded>
			<wfw:commentRss>http://cars.lostroncos.org/2010/02/17/a-more-interesting-environment-with-vyatta-and-vmware/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
