<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2.3" -->
<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/"
	>

<channel>
	<title>renial.net</title>
	<link>http://renial.net/weblog</link>
	<description></description>
	<pubDate>Mon, 19 Nov 2007 22:42:20 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.3</generator>
	<language>en</language>
			<item>
		<title>Bridging domains to tagged VLANs in Xen</title>
		<link>http://renial.net/weblog/2007/02/27/xen-vlan/</link>
		<comments>http://renial.net/weblog/2007/02/27/xen-vlan/#comments</comments>
		<pubDate>Tue, 27 Feb 2007 14:12:03 +0000</pubDate>
		<dc:creator>tristanb</dc:creator>
		
		<category><![CDATA[Development]]></category>

		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://renial.net/weblog/2007/02/27/xen-vlan/</guid>
		<description><![CDATA[The base Xen installation is configured such that all domains share a bridge to the first available ethernet interface.  Although this makes testing VMs quick and painless, for an upcoming project I want to be able to isolate individual DomUs from the rest of the network. Specifically, I want the Dom0 to tag all [...]]]></description>
			<content:encoded><![CDATA[<p>The base Xen installation is configured such that all domains share a bridge to the first available ethernet interface.  Although this makes testing VMs quick and painless, for an upcoming project I want to be able to isolate individual DomUs from the rest of the network. Specifically, I want the Dom0 to tag all traffic from a given DomU onto a VLAN. Here&#8217;s a simple example:</p>
<p><img src="/repository/perma/xen/diagram.png"/></p>
<p>Untagged traffic is sent to eth0 and ends up in Dom0. VLAN 2 traffic is set to eth0.2, which is bridged with DomU 1&#8217;s interface. The same occurs with VLAN 3 and DomU 2. One key point in this setup is that the DomUs are completely unaware of the fact that they are utilizing a VLAN, all the work is done within the bridges in Dom0. The Dom0 is also unaware of the traffic within the VLAN, as it does not have an active address on the eth0.X or vlanbrX interfaces.</p>
<p>To have Xen automatically create these bridges, I wrote the <a href="/repository/perma/xen/network-bridge-vlan">network-bridge-vlan</a> and <a href="/repository/perma/xen/network-multi-vlan">network-multi-vlan</a> scripts. They have been tested wtih Xen 3 running on Debian Sarge, but should work with most distributions. Make both scripts executable and place them in /etc/xen/scripts. The VLAN configuratin is done within the network-multi-vlan script. To activate the VLANs, edit  /etc/xen/xend-config.sxp to use the configuration line </p>
<pre>(network-script network-multi-vlan)</pre>
<p>To use a new VLAN bridge for an interface within your DomU, change the xen configuration file for the DomU so that the network interface has a bridge specified:</p>
<pre>vif = [ 'bridge=vlanbr2' ]</pre>
<p>Within the DomU, there are two things that may need to be configured. First, if your ethernet card does not natively support VLAN tags, you will have to set the maximum MTU to 1496 to make room for the tag. The command</p>
<pre>ifconfig eth0 mtu 1496</pre>
<p>accomplishes this in linux. Another problem is related to <a href="http://www.usenix.org/events/usenix06/tech/menon/menon_html/">network optimizations</a> done within Xen. With the DomUs bridged to VLAN interfaces, these optimizations need to be disabled or tcp and udp connections will fail. This is done by disabling transmit checksum offloading:</p>
<pre>ethtool -K eth0 tx off</pre>
<p>Both should be done in a script at startup. For Debian, I created the script /etc/network/if-up.d/xen containing:</p>
<pre>#!/bin/sh

case "$IFACE" in
        eth0)
                ethtool -K $IFACE tx off
                ifconfig $IFACE mtu 1496
                ;;
esac</pre>
]]></content:encoded>
			<wfw:commentRss>http://renial.net/weblog/2007/02/27/xen-vlan/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Howdy</title>
		<link>http://renial.net/weblog/2006/08/16/howdy/</link>
		<comments>http://renial.net/weblog/2006/08/16/howdy/#comments</comments>
		<pubDate>Wed, 16 Aug 2006 16:40:15 +0000</pubDate>
		<dc:creator>tristanb</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://renial.net/weblog/2006/08/16/howdy/</guid>
		<description><![CDATA[Welcome to my corner of the internet. If you&#8217;re here, you&#8217;re probably looking for my Gallery. All of the photos are freely available for personal use. If you would like to download a bunch, just add them to your cart and choose &#8220;Download in Zip&#8221; as your checkout method.
]]></description>
			<content:encoded><![CDATA[<p>Welcome to my corner of the internet. If you&#8217;re here, you&#8217;re probably looking for my <a href="http://renial.net/weblog/wp-gallery2.php">Gallery</a>. All of the photos are freely available for personal use. If you would like to download a bunch, just add them to your cart and choose &#8220;Download in Zip&#8221; as your checkout method.</p>
]]></content:encoded>
			<wfw:commentRss>http://renial.net/weblog/2006/08/16/howdy/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
