<?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>Local Loop &#187; dhcp</title>
	<atom:link href="http://localloop.co.za/tag/dhcp/feed/" rel="self" type="application/rss+xml" />
	<link>http://localloop.co.za</link>
	<description>Internet and Networking in South Africa</description>
	<lastBuildDate>Sat, 09 Jul 2011 00:48:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Setting interface MTU using DHCP</title>
		<link>http://localloop.co.za/2009/10/setting-interface-mtu-using-dhcp/</link>
		<comments>http://localloop.co.za/2009/10/setting-interface-mtu-using-dhcp/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 07:00:10 +0000</pubDate>
		<dc:creator>Simeon Miteff</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[dhcp]]></category>
		<category><![CDATA[fragmentation]]></category>
		<category><![CDATA[MSS]]></category>
		<category><![CDATA[MTU]]></category>
		<category><![CDATA[tunnels]]></category>

		<guid isPermaLink="false">http://localloop.co.za/?p=338</guid>
		<description><![CDATA[DHCP can be used to set the interface MTU on end hosts using option 26. For example (with dnsmasq), to set the MTU of clients on the lan interface to 1400 bytes, use: dhcp-option=lan,26,1400 I&#8217;m using this to work around MTU issues caused by a tunnel. It seems to work well so far&#8230; no need [...]]]></description>
			<content:encoded><![CDATA[<p>DHCP can be used to set the interface MTU on end hosts using option 26. For example (with dnsmasq), to set the MTU of clients on the <code>lan</code> interface to 1400 bytes, use: <code>dhcp-option=lan,26,1400</code></p>
<p>I&#8217;m using this to work around MTU issues caused by a tunnel. It seems to work well so far&#8230; no need for IP fragmentation or TCP MSS re-adjustment by a router.</p>
<p>The corresponding Debian <code>/etc/network/interfaces</code> magic for static <code>iface</code> stanzas is <code>"mtu 1400"</code>,</p>
]]></content:encoded>
			<wfw:commentRss>http://localloop.co.za/2009/10/setting-interface-mtu-using-dhcp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux home networking part 1: Static IP fall-back</title>
		<link>http://localloop.co.za/2009/02/linux-home-networking-part-1-static-ip-fall-back/</link>
		<comments>http://localloop.co.za/2009/02/linux-home-networking-part-1-static-ip-fall-back/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 07:58:42 +0000</pubDate>
		<dc:creator>Simeon Miteff</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[dhcp]]></category>
		<category><![CDATA[home networking]]></category>
		<category><![CDATA[ifplugd]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[networkmanager]]></category>
		<category><![CDATA[static ip fallback]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://localloop.co.za/?p=143</guid>
		<description><![CDATA[NetworkManager has made it&#8217;s way into the top Linux distributions as the standard way to manage network interfaces on desktop/notebook computers. I like NetworkManager. It works well for both wired and wireless interfaces with DHCP, and using wireless security and authentication is a breeze. With more recent versions you can also configure static IP addresses, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://projects.gnome.org/NetworkManager/"><code>NetworkManager</code></a> has made it&#8217;s way into the top Linux distributions as the standard way to manage network interfaces on desktop/notebook computers. I like <code>NetworkManager</code>. It works well for both wired and wireless interfaces with DHCP, and using wireless security and authentication is a breeze. With more recent versions you can also configure static IP addresses, but it doesn&#8217;t support a fall-back static IP configuration if DHCP fails to get a dynamic IP.</p>
<p>I need this capability, because my home network doesn&#8217;t have a router-like device to act as a DHCP server, but I would like to be able to take my notebook to work (or elsewhere), and use DHCP with minimal fuss.</p>
<p>It turns out this fall-back capability is supported in <code>dhcp3-client</code> (and perhaps other DHCP clients), by using a pre-defined lease in the config file (<code>/etc/dhcp3/dhclient.conf</code> on my Ubuntu 8.10 install):<br />
<code><br />
request subnet-mask, broadcast-address, time-offset, routers,<br />
        domain-name, domain-name-servers, domain-search, host-name,<br />
        netbios-name-servers, netbios-scope, interface-mtu;</p>
<p>timeout 10;</p>
<p>lease {<br />
  interface "eth0";<br />
  fixed-address 10.0.0.1;<br />
  option subnet-mask 255.255.255.0;<br />
  renew 2 2030/1/12 00:00:01;<br />
  rebind 2 2030/1/12 00:00:01;<br />
  expire 2 2030/1/12 00:00:01;<br />
}<br />
</code></p>
<p><code>dhcp3-client</code> will now try to get a lease from DHCP, and if it fails, it will configure the IP given in the pre-defined lease, effectively making this a static fall-back IP address.</p>
<p>Unfortunately when <code>NetworkManager</code> gets the news from the DHCP client that we could not get a lease from a DHCP server, it nukes the static configuration on the interface and takes us back to square one. I wanted a work-around that would allow me to keep <code>NetworkManager</code> (since I use it for my 3G modem too), so I came up with this:</p>
<p>I added the following stanza to my <code>/etc/network/interfaces</code> file:<br />
<code><br />
allow-hotplug eth0<br />
iface eth0 inet dhcp<br />
</code></p>
<p>This enables the standard Debian <code>ifup/ifdown</code> magic, and it also stops <code>NetworkManager</code> from managing the interface (which I don&#8217;t mind, since I never use 802.1x on wired networks).</p>
<p>In order to get back plug-and-play functionality (like <code>NetworkManager</code> provided by configuring the interface when it detected the link going up), I installed <code>ifplugd</code>, and configured it to watch my wired interface by changing <code>INTERFACES=""</code> to <code>INTERFACES="eth0"</code> in <code>/etc/default/ifplugd</code>, and restarting the daemon</code>.</p>
<p>An alternative to this setup would be to use IPv4LL addressing provided by <code>avahi-autoip</code>, but I prefer to manually allocate a static IP to each host.</p>
]]></content:encoded>
			<wfw:commentRss>http://localloop.co.za/2009/02/linux-home-networking-part-1-static-ip-fall-back/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Requesting a DHCP hostname with Debian</title>
		<link>http://localloop.co.za/2009/02/requesting-a-dhcp-hostname-with-debian/</link>
		<comments>http://localloop.co.za/2009/02/requesting-a-dhcp-hostname-with-debian/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 12:21:28 +0000</pubDate>
		<dc:creator>Simeon Miteff</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[/etc/network/interfaces]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[dhcp]]></category>
		<category><![CDATA[dhcp3-client]]></category>
		<category><![CDATA[dhcpcd]]></category>
		<category><![CDATA[hostname]]></category>

		<guid isPermaLink="false">http://localloop.co.za/?p=129</guid>
		<description><![CDATA[The DHCP server at my workplace allows clients to request a host name, and it then uses dynamic DNS updates to update the local DNS zone. To make this work on Debian, I added the hostname option to the LAN iface stanza in my /etc/network/interfaces file: iface eth0 inet dhcp hostname capybara Strangely, this option [...]]]></description>
			<content:encoded><![CDATA[<p>The DHCP server at my workplace allows clients to request a host name, and it then uses dynamic DNS updates to update the local DNS zone.</p>
<p>To make this work on Debian, I added the <code>hostname</code> option to the LAN <code>iface</code> stanza in my <code>/etc/network/interfaces</code> file:<br />
<code><br />
iface eth0 inet dhcp<br />
hostname capybara<br />
</code><br />
Strangely, this option is not supported with <code>dhcp3-client</code> (the ISC client, Debian&#8217;s default), so I had to install one of the alternatives listed in the <code>interfaces(5)</code> man page (pump, dhcpcd or udhcpc). I knew <code>dhcpcd</code> from my Gentoo days, so I tried it, and it worked.</p>
]]></content:encoded>
			<wfw:commentRss>http://localloop.co.za/2009/02/requesting-a-dhcp-hostname-with-debian/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

