<?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>x83.net &#187; ifconfig</title>
	<atom:link href="http://www.x83.net/tag/ifconfig/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.x83.net</link>
	<description></description>
	<lastBuildDate>Tue, 31 Jan 2012 13:53:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Setting a local network on Xenserver</title>
		<link>http://www.x83.net/setting-a-local-network-on-xenserver/</link>
		<comments>http://www.x83.net/setting-a-local-network-on-xenserver/#comments</comments>
		<pubDate>Mon, 18 Apr 2011 21:18:02 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[bridge]]></category>
		<category><![CDATA[ifconfig]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[local network]]></category>
		<category><![CDATA[public]]></category>
		<category><![CDATA[xen]]></category>
		<category><![CDATA[xenserver]]></category>

		<guid isPermaLink="false">http://www.x83.net/?p=692</guid>
		<description><![CDATA[After installing Xenserver 5.5 or 5.6 you will need to define additional IPs that your VMs will use. Usually your provider will give you a range that you can use. But what do you do when you do not want to pay additional $$$ just for a couple of routable ips? In my case I [...]]]></description>
			<content:encoded><![CDATA[<p>After installing Xenserver 5.5 or 5.6 you will need to define additional IPs that your VMs will use. Usually your provider will give you a range that you can use. But what do you do when you do not want to pay additional $$$ just for a couple of routable ips?</p>
<p>In my case I only have one public IP that is set on interface xenbr0 interface (bridged from eth0). In order to make my VMs to access the Internet I had to add an alias interface, something like :</p>
<p><code></p>
<p>ifconfig xenbr0:0 10.0.0.1 netmask 255.255.255.0 up</p>
<p></code></p>
<p>I will consider 10.0.0.0/24 my private LAN from where the VMs will get IPs. Additionally I route all traffic from 10.0.0.0/24 to xenbr0 using :</p>
<p><code>ip addr add 10.0.0.0/24 dev xenbr0</code></p>
<p>Now if you add an VM and set an IP from the 10.0.0.0/24 range you should be able to ping the 10.0.0.1 address. In order to reach the internet I also had to :</p>
<p><code><br />
iptables -t nat  -A POSTROUTING -s 10.0.0.0/255.255.255.0 -j MASQUERADE</p>
<p>iptables -I RH-Firewall-1-INPUT -s 10.0.0.0/24 -j ACCEPT</p>
<p>service iptables save<br />
</code></p>
<p>&nbsp;</p>
<p>Last thing is to modify /etc/sysctl.conf and enable ip_forward among other settings. This is how my config looks like:</p>
<p><code>net.ipv4.ip_forward = 1<br />
net.ipv4.conf.default.proxy_arp = 1<br />
net.ipv4.conf.all.send_redirects = 0<br />
net.ipv4.conf.default.send_redirects = 0<br />
net.ipv4.conf.lo.send_redirects = 0<br />
net.ipv4.conf.xenbr0.send_redirects = 0<br />
net.ipv4.conf.default.rp_filter = 1<br />
net.ipv4.icmp_echo_ignore_broadcasts = 1<br />
net.ipv4.conf.default.accept_source_route = 0<br />
net.ipv4.conf.all.accept_redirects = 0<br />
net.ipv4.conf.all.send_redirects = 0<br />
kernel.sysrq = 1<br />
kernel.core_uses_pid = 1<br />
net.ipv4.tcp_syncookies = 1<br />
kernel.msgmnb = 65536<br />
kernel.msgmax = 65536<br />
kernel.shmmax = 4294967295<br />
kernel.shmall = 268435456<br />
vm.dirty_ratio = 5<br />
kernel.printk = 4 4 1 4<br />
</code></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/setting-a-local-network-on-xenserver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD: GRE Tunnels</title>
		<link>http://www.x83.net/freebsd-gre-tunnels/</link>
		<comments>http://www.x83.net/freebsd-gre-tunnels/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 20:54:34 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[BSD]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[gre]]></category>
		<category><![CDATA[gre1]]></category>
		<category><![CDATA[ifconfig]]></category>
		<category><![CDATA[tunnel]]></category>

		<guid isPermaLink="false">http://www.x83.net/blog/?p=160</guid>
		<description><![CDATA[b0x# kldstat Id Refs Address Size Name 1 5 0xc0400000 34f898 kernel 2 14 0xc0750000 56270 acpi.ko 3 1 0xc0c97000 1c000 ipl.ko 4 1 0xc15ef000 4000 if_gre.ko # kldload if_gre.ko # sysctl -w net.inet.ip.gre_default_mtu=1450 # ifconfig gre1 create # ifconfig gre1 tunnel 217.154.12.2 212.25.240.34 # ifconfig gre1 mtu 1450 # ifconfig gre1 inet 10.1.12.38 10.1.12.37 [...]]]></description>
			<content:encoded><![CDATA[<pre>
b0x# kldstat
Id Refs Address Size Name
1 5 0xc0400000 34f898 kernel
2 14 0xc0750000 56270 acpi.ko
3 1 0xc0c97000 1c000 ipl.ko
4 1 0xc15ef000 4000 if_gre.ko
</pre>
<pre>
# kldload if_gre.ko
# sysctl -w net.inet.ip.gre_default_mtu=1450
# ifconfig gre1 create
# ifconfig gre1 tunnel 217.154.12.2 212.25.240.34
# ifconfig gre1 mtu 1450
# ifconfig gre1 inet 10.1.12.38 10.1.12.37 netmask 255.255.255.252
# ifconfig gre1 up
</pre>
<p>And that was that!</p>
<p>or Lan :</p>
<pre>
# ifconfig gre1 inet 10.1.12.37 10.1.12.38 netmask 255.255.255.252 up
# /usr/sbin/greconfig -i gre1 -v -s 212.25.240.34 -d 217.154.12.2
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/freebsd-gre-tunnels/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

