<?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>Felipe Alfaro Solana &#187; DNS</title>
	<atom:link href="http://www.felipe-alfaro.org/blog/category/dns/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.felipe-alfaro.org/blog</link>
	<description>A little bit of technology, security and networking with Linux, FreeBSD and Mac OS X, plus some personal opinions.</description>
	<lastBuildDate>Sun, 23 Oct 2011 16:46:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>http://what-has-your-registrar-done-for-you-lately.com/</title>
		<link>http://www.felipe-alfaro.org/blog/2006/12/29/what-has-your-registrar-done-for-you-lately/</link>
		<comments>http://www.felipe-alfaro.org/blog/2006/12/29/what-has-your-registrar-done-for-you-lately/#comments</comments>
		<pubDate>Fri, 29 Dec 2006 02:39:15 +0000</pubDate>
		<dc:creator>Felipe Alfaro Solana</dc:creator>
				<category><![CDATA[DNS]]></category>

		<guid isPermaLink="false">http://felipe-alfaro.org/blog/2006/12/29/httpwhat-has-your-registrar-done-for-you-latelycom/</guid>
		<description><![CDATA[Today I stumbled across a Web page called http://what-has-your-registrar-done-for-you-lately.com/. Brilliant!]]></description>
			<content:encoded><![CDATA[<p>Today I stumbled across a Web page called <a href="http://what-has-your-registrar-done-for-you-lately.com/">http://what-has-your-registrar-done-for-you-lately.com/</a>. Brilliant! <img src='http://www.felipe-alfaro.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.felipe-alfaro.org/blog/2006/12/29/what-has-your-registrar-done-for-you-lately/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Diez cosas que DEBES conocer ANTES de registrar un dominio con cualquiera</title>
		<link>http://www.felipe-alfaro.org/blog/2006/12/29/diez-cosas-que-debes-conocer-antes-de-registrar-un-dominio-con-cualquiera/</link>
		<comments>http://www.felipe-alfaro.org/blog/2006/12/29/diez-cosas-que-debes-conocer-antes-de-registrar-un-dominio-con-cualquiera/#comments</comments>
		<pubDate>Fri, 29 Dec 2006 02:34:20 +0000</pubDate>
		<dc:creator>Felipe Alfaro Solana</dc:creator>
				<category><![CDATA[DNS]]></category>

		<guid isPermaLink="false">http://felipe-alfaro.org/blog/2006/12/29/diez-cosas-que-debes-conocer-antes-de-registrar-un-dominio-con-cualquiera/</guid>
		<description><![CDATA[Leo en el Blog de SIGT.NET un excepcional artículo sobre las diez cosas que debes conocer antes de registrar un dominio con un registrador cualquiera. ¡Enhorabuena, Armonth!]]></description>
			<content:encoded><![CDATA[<p>Leo en el Blog de <a href="http://sigt.net" title="SIGT.NET">SIGT.NET</a> un <a href="http://sigt.net/archivo/diez-cosas-que-debes-conocer-antes-de-registrar-un-dominio-con-cualquiera.xhtml">excepcional artículo sobre las diez cosas que debes conocer antes de registrar un dominio</a> con un registrador cualquiera. ¡Enhorabuena, Armonth! <img src='http://www.felipe-alfaro.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.felipe-alfaro.org/blog/2006/12/29/diez-cosas-que-debes-conocer-antes-de-registrar-un-dominio-con-cualquiera/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Integrated DHCP and DNS services using OpenWRT</title>
		<link>http://www.felipe-alfaro.org/blog/2006/05/15/integrated-dhcp-and-dns-services-using-openwrt/</link>
		<comments>http://www.felipe-alfaro.org/blog/2006/05/15/integrated-dhcp-and-dns-services-using-openwrt/#comments</comments>
		<pubDate>Mon, 15 May 2006 10:40:22 +0000</pubDate>
		<dc:creator>Felipe Alfaro Solana</dc:creator>
				<category><![CDATA[DHCP]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[OpenWRT]]></category>

		<guid isPermaLink="false">http://felipe-alfaro.org/blog/2006/05/15/integrated-dhcp-and-dns-services-using-openwrt/</guid>
		<description><![CDATA[dnsmasq offers a lightweight, functional and integrated DHCP and DNS service. Using it on OpenWRT brings up and embedded, flexible DNS service, with a very small footprint, for small or home offices. dnsmasq acts as a caching DNS server and DHCP server. It reserves a DNS domain, called the local DNS domain and usually being [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://thekelleys.org.uk/dnsmasq/doc.html" title="dnsmasq">dnsmasq</a> offers a lightweight, functional and integrated DHCP and DNS service. Using it on OpenWRT brings up and embedded, flexible DNS service, with a very small footprint, for small or home offices.</p>
<p><em>dnsmasq</em> acts as a caching DNS server and DHCP server. It reserves a DNS domain, called the local DNS domain and usually being <code>.lan</code>, for local name resolution. When queried for an A RR inside the local DNS domain, <em>dnsmasq</em> looks at file <code>/etc/hosts</code> for a match. If one is found, its corresponding IP is returned as the query result. When queried for a PTR RR, it looks into file <code>/etc/hosts</code> for a match by IP and, if one is found, its correspoding hostname, qualified with the local DNS domain, is returned. Thus, <code>/etc/hosts</code> behaves much like a DNS master zone file.</p>
<p>Also, if the DHCP server funcionality of <em>dnsmasq</em> is enabled, when a query under the local DNS domain fails (no record is found in <code>/etc/hosts</code>), it will try to resolve the query from the DHCP lease database.</p>
<p>The DHCP lease database is usually stored at <code>/tmp/dhcp.leases</code>. Its format is pretty simple: it&#8217;s a text file, where each line represents an active DHCP lease. Each line is made up of five fields:</p>
<ol>
<li><b>Time of lease expiration</b>
<p>In epoch time (seconds since 1970). States when the lease will expire. Most DHCP clients will try to renew the lease when it reaches 80% of its valid lifetime.</li>
<li><b>Client MAC address</b>
<p>The MAC address corresponding to the client to which the lease belongs.</li>
<li><b>Leased IP address</b>
<p>A valid IP address, taken from the DHCP pool, which is actually and currently leased to the client whose MAC address is listed in the previous field.</li>
<li><b>Client hostname</b>
<p>If known, holds the unqualified host name of the client machine. Else, an asterisk is stored here.</li>
<li><b>Client ID</b>
<p>Simon Kelley defines it as:</p>
<blockquote><p>
The client-ID is used as the computer&#8217;s unique-ID in preference to the MAC address, if it&#8217;s available. Some DHCP clients provide it, and some don&#8217;t. The ones that do normally derive it from the MAC address unless explicity configured, but it could be something like a serial number, which would protect a computer from losing its identify if the network interface were replaced.
</p></blockquote>
<p>If not know, an asterisk is stored here.</li>
</ol>
<p>A sample DHCP database lease:</p>
<div>
<pre>
# cat /tmp/dhcp.leases
1147729862 00:16:3e:3b:56:f1 192.168.0.11 rhel *
1147725355 00:0c:29:09:3d:58 192.168.0.10 rhel-devel *
</pre>
</div>
<p>In this case, there are two active DHCP leases, one for client <code>rhel</code>, another one for <code>rhel-devel</code>.</p>
<p>OpenWRT uses a <em>rc.d</em> script stored at <code>/etc/init.d/S50dnsmasq</code><code> which, for a <em>squashfs</em> firmware is a symbolic link to </code><code>/rom/etc/init.d/S50dnsmasq</code>. This <em>rc.d</em> script tries to configure the <em>dnsmasq</em> daemon using NVRAM variables, which helps a lot when reflashing. However, I have found more convenient to the use the traditional <code>/etc/dnsmasq.conf</code> file instead.</p>
<p>Replacing the OpenWRT rc.d script with a custom one, in order to leverage <code>dnsmasq.conf</code>, is as simple as removing <code>/etc/init.d/S50dnsmasq</code> and invoking the <em>dnsmasq</em> daemon directly:</p>
<div>
<pre>
rm -f /etc/init.d/S50dnsmasq
cat > /etc/init.d/S50dnsmasq < < EOF
#/bin/sh
/usr/sbin/dnsmasq
EOF
</pre>
</pre>
</div>
<p>Here is a sample of a <code>/etc/dnsmasq.conf</code> file I use on my Linksys WRT54G router running OpenWRT White Russian RC5:</p>
<div>
<pre>
# filter what we send upstream
domain-needed
bogus-priv
filterwin2k
localise-queries

# allow /etc/hosts and dhcp lookups via *.lan
local=/lan/
domain=lan
expand-hosts

# enable dhcp (start,end,netmask,leasetime)
dhcp-authoritative
dhcp-range=10.0.0.10,10.0.0.100,255.255.255.128,12h
dhcp-leasefile=/tmp/dhcp.leases

# use /etc/ethers for static hosts; same format as --dhcp-host
# [hwaddr] [ipaddr]
read-ethers

# other useful options:
# default route(s): dhcp-option=3,192.168.1.1,192.168.1.2
#    dns server(s): dhcp-option=6,192.168.1.1,192.168.1.2
dhcp-option=3,10.0.0.126
dhcp-option=6,10.0.0.122
</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.felipe-alfaro.org/blog/2006/05/15/integrated-dhcp-and-dns-services-using-openwrt/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

