<?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>Space 4 Tutorial &#187; Servizio DNS</title>
	<atom:link href="http://www.space4tutorial.com/category/linux/serviziodns/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.space4tutorial.com</link>
	<description>il blog per entrare liberamente nel mondo informatico</description>
	<lastBuildDate>Tue, 06 Jul 2010 09:50:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Un&#8217;altro e-book su Ubuntu, ma stavolta sulla versione Server!</title>
		<link>http://www.space4tutorial.com/2008/08/11/unaltro-e-book-su-ubuntu-ma-stavolta-sulla-versione-server/</link>
		<comments>http://www.space4tutorial.com/2008/08/11/unaltro-e-book-su-ubuntu-ma-stavolta-sulla-versione-server/#comments</comments>
		<pubDate>Mon, 11 Aug 2008 09:43:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Altro]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mail Server]]></category>
		<category><![CDATA[Servizio DNS]]></category>
		<category><![CDATA[Shell e Comandi]]></category>
		<category><![CDATA[Sicurezza]]></category>
		<category><![CDATA[e-book]]></category>

		<guid isPermaLink="false">http://www.space4tutorial.com/2008/08/11/unaltro-e-book-su-ubuntu-ma-stavolta-sulla-versione-server/</guid>
		<description><![CDATA[Ciao a tutti,
vi invio il link a questo nuovo ebook su Ubuntu Server, perché Ubuntu non è solo desktop e agli amministratori di sistema può servire sicuramente.
E poi, mi sembra giusto completare il quadro complessivo, no?
La versione alla quale si fa riferimento è la 6.10, ma la guida va certamente bene per qualsiasi più recente [...]]]></description>
			<content:encoded><![CDATA[<p align="justify">Ciao a tutti,</p>
<p align="justify">vi invio il link a questo nuovo ebook su Ubuntu Server, perché Ubuntu non è solo desktop e agli amministratori di sistema può servire sicuramente.</p>
<p align="justify">E poi, mi sembra giusto completare il quadro complessivo, no?</p>
<p align="justify">La versione alla quale si fa riferimento è la 6.10, ma la guida va certamente bene per qualsiasi più recente versione di questo fantastico sistema operativo. Unico neo: la guida è in inglese, ma d&#8217;altro canto, la maggior parte degli ebook è scritta in inglese, quindi non me ne vogliate <img src='http://www.space4tutorial.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p align="justify">Il link è: <a href="https://help.ubuntu.com/6.10/pdf/ubuntu/C/serverguide.pdf">https://help.ubuntu.com/6.10/pdf/ubuntu/C/serverguide.pdf</a></p>
<p align="justify">Buona lettura a tutti!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.space4tutorial.com/2008/08/11/unaltro-e-book-su-ubuntu-ma-stavolta-sulla-versione-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configurare un server DNS di cache con BIND</title>
		<link>http://www.space4tutorial.com/2007/07/31/configurare-un-server-dns-di-cache-con-bind/</link>
		<comments>http://www.space4tutorial.com/2007/07/31/configurare-un-server-dns-di-cache-con-bind/#comments</comments>
		<pubDate>Tue, 31 Jul 2007 18:27:19 +0000</pubDate>
		<dc:creator>Roberto Travagliante (HoneyFT)</dc:creator>
				<category><![CDATA[Servizio DNS]]></category>
		<category><![CDATA[Varie]]></category>

		<guid isPermaLink="false">http://www.space4tutorial.com/?p=21</guid>
		<description><![CDATA[Ciao a tutti!
Ecco in linea la guida pratica per configurare un server DNS di cache con il software BIND presente in moltissime distribuzioni del Sistema Operativo GNU Linux. Appena possibile, seguiranno altre guide sulla configurazione di un server DNS primario e secondario.
Sono graditissimi commenti, opinioni e suggerimenti per migliorarla!
Livello: Medio/Avanzato

Dopo un&#8217;approfondita riflessione, ho deciso di [...]]]></description>
			<content:encoded><![CDATA[<p>Ciao a tutti!</p>
<p>Ecco in linea la guida pratica per configurare un server DNS di cache con il software BIND presente in moltissime distribuzioni del Sistema Operativo GNU Linux. Appena possibile, seguiranno altre guide sulla configurazione di un server DNS primario e secondario.</p>
<p>Sono graditissimi commenti, opinioni e suggerimenti per migliorarla!</p>
<p><strong><em>Livello: Medio/Avanzato</em></strong></p>
<p><span id="more-21"></span></p>
<p>Dopo un&#8217;approfondita riflessione, ho deciso di postare su Space4Tutorial una breve guida che avevo realizzato qualche tempo fa con un mio carissimo amico nonché appassionato di sistemi operativi open-sources e che vorrei salutare: grazie Claudio Satriano.</p>
<p>Si tratta di un tutorial che fa riferimento alla versione 9.2.2 di BIND, ma può essere utilizzato senza problemi anche con versioni successive. Al momento della stesura di questo articolo, Bind è arrivato alla versione 9.4.1. Appena possibile, mi dedicherò al suo aggiornamento, integrando il tutorial con le modifiche che nel frattempo saranno intervenute.</p>
<p>Per una panoramica sul funzionamento del servizio di risoluzione dei Nomi di Dominio (DNS), si suggerisce di dare una lettura all&#8217;articolo relativo presente su questo blog e disponibile all&#8217;indirizzo <a href="http://www.space4tutorial.com/?p=9">http://www.space4tutorial.com/?p=9</a>, che illustra, tra le altre cose, i possibili ruoli di un server DNS.</p>
<p style="margin: 0cm 0cm 0pt" class="Default"><strong><em><span style="font-size: 16pt; color: black"><font face="Times New Roman">Scopriamo i segreti del DNS, con BIND&#8230;</font></span></em></strong></p>
<p><span style="color: black"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><font face="Times New Roman"><span style="color: black">Dopo una discussione sui fondamenti teorici che riguardano il Domain Name System (<a href="http://www.space4tutorial.com/?p=9">http://www.space4tutorial.com/?p=9</a>), analizziamo in questo articolo gli aspetti pratici relativi alla configurazione e alla gestione di un server DNS con il sistema operativo GNU/Linux.</span></font></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><font face="Times New Roman"><span style="color: black"></span></font></p>
<p><font face="Times New Roman"><span style="color: black"></span></font><font face="Times New Roman"><span style="color: black"></span></font><font face="Times New Roman"><span style="color: black"></span></font><font face="Times New Roman"><span></span></font><font face="Times New Roman"><span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span style="color: black">Nel mondo del pinguino, il pacchetto BIND (Berkeley Internet Name Domain) è certamente il punto di riferimento per ciò che concerne la gestione del DNS. Tuttavia, esso non è l&#8217;unico software disponibile. Ve ne sono altri, tra cui ad esempio </span><em><span style="color: black">djbdns</span></em><span style="color: black"> (</span><span lang="EN-US"><a href="http://cr.yp.to/djbdns.html"><span class="InternetLink"><font color="#000080">http://cr.yp.to/djbdns.html</font></span></a></span><span style="color: black">) o </span><em><span style="color: black">MaraDNS</span></em><span style="color: black"> (</span><span lang="EN-US"><a href="http://www.maradns.org/"><span class="InternetLink"><font color="#000080">http://www.maradns.org</font></span></a></span><span style="color: black">). In questo e negli articoli che seguiranno parleremo di BIND in quanto questo pacchetto software, oltre ad essere quello maggiormente impiegato, è certamente quello per il quale si può disporre del miglior supporto e della documentazione più ampia.</span></p>
<p><span style="color: black"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span style="color: black">BIND è reperibile all&#8217;indirizzo </span><span lang="EN-US"><a href="http://www.isc.org/products/BIND/"><span class="InternetLink"><font color="#000080">http://www.isc.org/products/BIND/</font></span></a></span><span style="color: black">. Esso è disponibile in formato tarball (.tar.gz) o RPM, per le distribuzioni che supportano questo sistema di gestione dei pacchetti, come Mandrake o Red Hat.</span></p>
<p><span style="color: black"></span><span style="color: black"><span style="color: black">Nel caso in cui si desideri effettuare l&#8217;installazione dai sorgenti, la procedura da seguire è quella usuale, ovvero, dopo aver decompresso il .tar.gz ed esserci collocati nella directory creata, digitiamo:</span></span></p>
<p><span style="color: black"><span style="color: black"></span><span style="color: black"></span><span style="color: black"><span>                        </span></span><strong><span style="color: black">./configure</span></strong></span></p>
<p><span style="color: black"><strong><span style="color: black"></span></strong><span style="color: black"></span><span style="color: black"><span>                        </span></span><strong><span style="color: black">make</span></strong></span></p>
<p><span style="color: black"><strong><span style="color: black"></span></strong><span style="color: black"></span><span style="color: black"><span>                        </span></span><strong><span style="color: black">su -c “make install”</span></strong><span style="color: black"> </span><em><span style="color: black">(tale operazione richiede la password di root)</span></em></span></p>
<p><span style="color: black">Invece, per chi preferisce il sistema di gestione dei pacchetti RPM, è possibile installare BIND eseguendo:</span></p>
<p><span style="color: black"></span><span style="color: black"></span><span style="color: black"><span>                        </span></span><strong><span style="color: black">rpm -ivh &lt;nome-del-pacchetto&gt;.rpm</span></strong></p>
<p><span style="color: black">Poiché BIND gestisce un servizio delicato che, per via della sua natura, è molto spesso collocato nei punti della rete maggiormente esposti agli attacchi esterni, è di fondamentale importanza reperirne una versione aggiornata, per avere la certezza (relativa, peraltro) che non vi siano bugs anche gravi che potrebbero compromettere il normale e corretto funzionamento di tutta la rete.</span><span style="color: black"></span><span style="color: black"> </span><span style="color: black">Infatti, alcune versioni poco recenti del software soffrono di vulnerabilità legate a buffer overflows, che possono essere sfruttate da un attacker per realizzare condizioni di Denial Of Service, per redirezionare il traffico di rete o, ancora peggio, ottenere l&#8217;accesso al sistema, tramite l&#8217;esecuzione remota di codice.</span><span style="color: black"></span><span style="color: black"> </span><span style="color: black"><span style="color: black">Al momento della stesura di questo articolo, la versione corrente di BIND è la numero 9, perciò in queste righe faremo riferimento ad essa.</span><span style="color: black"></span></span></p>
<p></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default">&nbsp;</p>
<p><strong><em><span style="font-size: 16pt; color: black">Cosa comprende BIND</span></em></strong><strong><em><span style="font-size: 16pt; color: black"></span></em></strong><span style="color: black"> </span></p>
<p><span style="color: black"></span><span style="color: black"><span style="color: black">BIND non è soltanto un server DNS. Esso, come afferma l&#8217;ISC (</span><em><span style="color: black">Internet Software Consortium</span></em><span style="color: black">), costituisce &#8220;un&#8217;implementazione del protocollo DNS&#8221; ed è composto da:</span><span style="color: black"></span><span style="color: black"><span>1)</span></span><span style="color: black">un server DNS, chiamato </span><em><span style="color: black">named</span></em><span style="color: black"> (conformemente alle modalità di denominazione utilizzate nel mondo *nix per i processi demoni, named = name daemon);</span><span style="color: black"></span><span style="color: black"><span>2)</span></span><span style="color: black">una libreria di funzioni finalizzate alla risoluzione dei nomi;</span><span style="color: black"></span><span style="color: black"><span>3)</span></span><span style="color: black">un&#8217;insieme di utilities per la gestione del server DNS e per la risoluzione dei problemi.</span><span style="color: black"></span><span style="color: black"> </span></span><span style="color: black"><span style="color: black">Tra queste ultime, in particolare, assumono grande importanza le utilities </span><strong><span style="color: black">dig</span></strong><span style="color: black"> e </span><strong><span style="color: black">nslookup</span></strong><span style="color: black">, le quali consentono di effettuare interrogazioni ai servers DNS, costituendo un utile strumento per la diagnosi e la risoluzione dei problemi.</span><span style="color: black"></span><span style="color: black"> </span><span style="color: black"><span style="color: black">In questo articolo vediamo come realizzare, tramite BIND, un name server di cache. Come abbiamo già spiegato nella parte teorica relativa al funzionamento del Domain Name System, un server di cache è un name server che ha, come scopo principale, quello di migliorare l&#8217;efficienza nella risoluzione dei nomi di dominio. Esso, infatti, man mano che riceve delle richieste DNS, memorizza le risposte ottenute da altri servers DNS in una memoria di cache, la quale si popola man mano. Il server di cache, in seguito, utilizza tale memoria per rispondere alle richieste successive senza interpellare altri name servers, riducendo perciò i tempi per la risoluzione.</span><span style="color: black"></span><span style="color: black"> </span></span></span><span style="color: black"> </span><span style="color: black"><strong><em><span style="font-size: 16pt; color: black">Configurazione di un server di cache</span></em></strong><strong><em><span style="font-size: 16pt; color: black"></span></em></strong><span style="color: black"> </span><span style="color: black"><span style="color: black">Il file principale, per la configurazione del server named è </span><strong><span style="color: black">/etc/named.conf</span></strong><span style="color: black">. Questo file viene utilizzato da </span><em><span style="color: black">named</span></em><span style="color: black"> all&#8217;avvio del servizio e, nella sua forma più semplice, dovrebbe apparire grosso modo così:</span><span style="color: black"></span><span style="color: black"> </span></span><span style="color: black"><span style="font-size: 10pt; color: black; font-family: Courier">// File di configurazione &#8220;/etc/named.conf&#8221;</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier">// per un name server con funzioni di cache</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"> </span><span style="font-size: 10pt; color: black; font-family: Courier"><span style="font-size: 10pt; color: black; font-family: Courier">options {</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"><span>        </span>directory &#8220;/var/named&#8221;;</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier">};</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"> </span></span><span style="font-size: 10pt; color: black; font-family: Courier">zone &#8220;.&#8221; {</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"><span>        </span>type hint;</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"><span>        </span>file &#8220;root.hints&#8221;;</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier">};</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"> </span><span style="font-size: 10pt; color: black; font-family: Courier"><span style="font-size: 10pt; color: black; font-family: Courier">zone &#8220;0.0.127.in-addr.arpa&#8221; {</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"><span>        </span>type master;</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"><span>        </span>file &#8220;primary_zone/127.0.0&#8243;;</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier">};</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="color: black"> </span></span><span style="font-size: 10pt; color: black; font-family: Courier"><span style="color: black">Questo file di configurazione, come si può constatare, si compone di diverse sezioni, ognuna delle quali è riferita ad un particolare aspetto del funzionamento di named. Una descrizione completa di esse può essere ottenuta invocando la pagina del manuale relativa con </span><strong><span style="color: black">man named.conf</span></strong><span style="color: black">.</span><span style="color: black"></span><span style="color: black"> </span><span style="color: black"><span style="color: black">La sezione </span><em><span style="color: black">options</span></em><span style="color: black"> descrive la configurazione globale del server DNS. Nell&#8217;esempio riportato sopra, essa contiene l&#8217;indicazione della working directory </span><em><span style="color: black">/var/named</span></em><span style="color: black"> dove si trovano gli altri files di configurazione. In tale sezione</span><em><span style="color: black"> </span></em><span style="color: black">si può stabilire, inoltre, attraverso la clausola </span><em><span style="color: black">listen-on</span></em><span style="color: black">, l&#8217;indirizzo e la porta sulla quale mettere in ascolto il server (di default named si pone in ascolto su tutti gli indirizzi, utilizzando la porta 53 UDP e TCP).</span><span style="color: black"></span><span style="color: black"> </span></span></span></span></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'">La sezione <em>zone</em> è quella di maggiore interesse. Essa stabilisce come deve funzionare il nostro server DNS in base al nome di dominio da risolvere.<em> </em>Il pacchetto BIND consente la gestione di 5 tipi di zona:</span></p>
<ul>
<li style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"><strong>master:</strong> <span style="font-size: 12pt; color: black; font-family: 'Times New Roman'">indica che il server è autoritativo per questa zona, ovvero contiene la copia principale delle informazioni relative ad essa;</span></span></li>
<li style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"><strong>slave:</strong> <span style="font-size: 12pt; color: black; font-family: 'Times New Roman'">stabilisce che il server contiene una copia delle informazioni per questa zona, ottenute contattando un altro name server (indicato all&#8217;interno della sezione);</span></span></li>
<li style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"><strong>hint:</strong> <span style="font-size: 12pt; color: black; font-family: 'Times New Roman'">questo tipo indica dove reperire l&#8217;elenco dei root servers (con i relativi indirizzi IP) da utilizzare nella risoluzione dei nomi di dominio, quando questi non siano ancora presenti nella memoria cache;</span></span></li>
<li style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"><strong>stub:</strong> <span style="font-size: 12pt; color: black; font-family: 'Times New Roman'">questo tipo funziona alla stessa maniera del tipo slave, con l&#8217;unica differenza che esso replica soltanto i records di tipo NS;</span></span></li>
<li style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"><strong>forward:</strong> <span style="font-size: 12pt; color: black; font-family: 'Times New Roman'">stabilisce che ogni richiesta ricevuta relativa alla zona deve essere inoltrata ad un altro name server.</span></span></li>
</ul>
<p><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"><span style="color: black">Nell&#8217;esempio abbiamo due definizioni di zona. La prima (</span><em><span style="color: black">zone</span></em><span style="color: black"> &#8220;.&#8221;) descrive il comportamento da adottare per tutte le zone. Questo, nel caso di un name server di cache, consiste nel risolvere un nome di dominio attraverso l&#8217;interrogazione di qualche altro name server nel mondo, che abbia la competenza per quel nome e che può essere raggiunto grazie a un server radice.</span><span style="color: black"></span><span style="color: black">Per questo motivo la zona &#8220;.&#8221; è una zona di tipo </span><em><span style="color: black">hint</span></em><span style="color: black"> e indica che l&#8217;elenco dei root name servers si trova nel file </span><em><span style="color: black">root.hints</span></em><span style="color: black"> (precisamente </span><em><span style="color: black">/var/named/root.hints</span></em><span style="color: black">, come risulta dalla clausola </span><em><span style="color: black">directory</span></em><span style="color: black"> della sezione </span><em><span style="color: black">options</span></em><span style="color: black">).</span><span style="color: black"></span><span style="color: black">L&#8217;elenco dei root servers può essere soggetto a variazioni, pertanto consigliamo di reperirne una versione aggiornata da Internet, al link </span><strong><span style="color: black">ftp://ftp.internic.net/domain/</span></strong><span style="color: black">, oppure attraverso l&#8217;utility dig (noi preferiamo quest&#8217;ultima soluzione), semplicemente digitando al prompt:</span><span style="color: black"></span><span style="color: black"> </span></span></span><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"><span style="color: black"><strong><span style="color: black">dig</span></strong><strong><span style="color: black"></span></strong><span style="color: black"> </span></span></span></span><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"><span style="color: black"><span style="color: black">Inoltre, possiamo aggiornare automaticamente il file contenente l&#8217;elenco dei root name servers redirezionando l&#8217;output di dig:</span><span style="color: black"></span><span style="color: black"> </span><span style="color: black"><strong><span style="color: black">dig &gt; /var/named/root.hints</span></strong><strong><span style="color: black"></span></strong><span style="color: black"> </span></span></span></span></span><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"><span style="color: black"> </span></span><span style="color: black">Di seguito mostriamo un esempio di file </span><em><span style="color: black">root.hints</span></em><span style="color: black"> da noi ottenuto con l&#8217;ausilio di dig (l&#8217;output risulta abbreviato per ovvi motivi di spazio):</span><span style="color: black"></span><span style="color: black"> </span></span><span style="color: black"><span style="font-size: 9pt; color: black; font-family: Courier">; &lt;&lt;&gt;&gt; DiG 9.2.2-P3 &lt;&lt;&gt;&gt;</span><span style="font-size: 9pt; color: black; font-family: Courier"></span><span style="font-size: 9pt; color: black; font-family: Courier">;; global options:<span>  </span>printcmd</span><span style="font-size: 9pt; color: black; font-family: Courier"></span><span style="font-size: 9pt; color: black; font-family: Courier">;; Got answer:</span><span style="font-size: 9pt; color: black; font-family: Courier"></span><span style="font-size: 9pt; color: black; font-family: Courier">;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 28573</span><span style="font-size: 9pt; color: black; font-family: Courier"></span><span style="font-size: 9pt; color: black; font-family: Courier">;; flags: qr rd ra; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 13</span><span style="font-size: 9pt; color: black; font-family: Courier"></span><span style="font-size: 9pt; color: black; font-family: Courier"> </span></span><span style="color: black"><span style="font-size: 9pt; color: black; font-family: Courier">;; QUESTION SECTION:</span><span style="font-size: 9pt; color: black; font-family: Courier"></span><span style="font-size: 9pt; color: black; font-family: Courier">;.<span>                         </span>IN<span>     </span>NS</span><span style="font-size: 9pt; color: black; font-family: Courier"></span><span style="font-size: 9pt; color: black; font-family: Courier"> </span><span style="font-size: 9pt; color: black; font-family: Courier"><span style="font-size: 9pt; color: black; font-family: Courier">;; ANSWER SECTION:</span><span style="font-size: 9pt; color: black; font-family: Courier"></span><span style="font-size: 9pt; color: black; font-family: Courier">.<span>                   </span>185810<span> </span>IN<span>     </span>NS<span>     </span>K.ROOT-SERVERS.NET.</span><span style="font-size: 9pt; color: black; font-family: Courier"></span><span style="font-size: 9pt; color: black; font-family: Courier">.<span>                   </span>185810<span> </span>IN<span>     </span>NS<span>     </span>L.ROOT-SERVERS.NET.</span><span style="font-size: 9pt; color: black; font-family: Courier"></span><span style="font-size: 9pt; color: black; font-family: Courier">.<span>                   </span>185810<span> </span>IN<span>     </span>NS<span>     </span>M.ROOT-SERVERS.NET.</span><span style="font-size: 9pt; color: black; font-family: Courier"></span><span style="font-size: 9pt; color: black; font-family: Courier">.<span>                   </span>185810<span> </span>IN<span>     </span>NS<span>     </span>I.ROOT-SERVERS.NET.</span><span style="font-size: 9pt; color: black; font-family: Courier"></span><span style="font-size: 9pt; color: black; font-family: Courier">&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.</span><span style="font-size: 9pt; color: black; font-family: Courier"></span><span style="font-size: 9pt; color: black; font-family: Courier">&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.</span><span style="font-size: 9pt; color: black; font-family: Courier"></span><span style="font-size: 9pt; color: black; font-family: Courier">&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.</span><span style="font-size: 9pt; color: black; font-family: Courier"></span><span style="font-size: 9pt; color: black; font-family: Courier"> </span></span></span><span style="color: black"><span style="font-size: 9pt; color: black; font-family: Courier">;; ADDITIONAL SECTION:</span><span style="font-size: 9pt; color: black; font-family: Courier"></span><span style="font-size: 9pt; color: black; font-family: Courier">K.ROOT-SERVERS.NET.<span> </span>272210<span> </span>IN<span>     </span>A<span>      </span>193.0.14.129</span><span style="font-size: 9pt; color: black; font-family: Courier"></span><span style="font-size: 9pt; color: black; font-family: Courier">L.ROOT-SERVERS.NET.<span> </span>272210<span> </span>IN<span>     </span>A<span>      </span>198.32.64.12</span><span style="font-size: 9pt; color: black; font-family: Courier"></span><span style="font-size: 9pt; color: black; font-family: Courier">M.ROOT-SERVERS.NET.<span> </span>272210<span> </span>IN<span>     </span>A<span>      </span>202.12.27.33</span><span style="font-size: 9pt; color: black; font-family: Courier"></span><span style="font-size: 9pt; color: black; font-family: Courier">I.ROOT-SERVERS.NET.<span> </span>272210<span> </span>IN<span>     </span>A<span>      </span>192.36.148.17</span><span style="font-size: 9pt; color: black; font-family: Courier"></span><span style="font-size: 9pt; color: black; font-family: Courier">&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.</span><span style="font-size: 9pt; color: black; font-family: Courier"></span><span style="font-size: 9pt; color: black; font-family: Courier">&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.</span><span style="font-size: 9pt; color: black; font-family: Courier"></span><span style="font-size: 9pt; color: black; font-family: Courier">&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.</span><span style="font-size: 9pt; color: black; font-family: Courier"></span><span style="font-size: 9pt; color: black; font-family: Courier"> </span><span style="font-size: 9pt; color: black; font-family: Courier"><span style="font-size: 9pt; color: black; font-family: Courier">;; Query time: 312 msec</span><span style="font-size: 9pt; color: black; font-family: Courier"></span><span style="font-size: 9pt; color: black; font-family: Courier">;; SERVER: 192.168.3.10#53(192.168.3.10)</span><span style="font-size: 9pt; color: black; font-family: Courier"></span><span style="font-size: 9pt; color: black; font-family: Courier">;; WHEN: Fri Nov 21 10:55:00 2003</span><span style="font-size: 9pt; color: black; font-family: Courier"></span><span style="font-size: 9pt; color: black; font-family: Courier">;; MSG SIZE<span>  </span>rcvd: 436</span><span style="font-size: 9pt; color: black; font-family: Courier"></span><span style="font-size: 9pt; color: black; font-family: Courier"> </span></span><span style="font-size: 9pt; color: black; font-family: Courier"> </span><span style="color: black">Come possiamo constatare, questo file contiene dei records di risorsa NS, che indicano i nomi dei root servers utilizzabili e dei records di tipo A, con gli indirizzi IP relativi ad essi. Poiché, come abbiamo già detto, queste informazioni sono soggette a cambiamenti nel corso del tempo, sarebbe opportuno predisporre un apposito script che aggiorni periodicamente questo file.</span><span style="color: black"></span><span style="color: black"> </span><span style="color: black"><span style="color: black">La seconda definizione di zona (&#8220;0.0.127.in-addr.arpa&#8221;) è inserita nel file </span><em><span style="color: black">named.conf </span></em><span style="color: black">per consentire la risoluzione dell&#8217;indirizzo di loopback, cioè 127.0.0.1, nel nome localhost convenzionalmente assegnato ad esso. Le informazioni relative a questa zona sono contenute, come si evince dall&#8217;esempio, nel file </span><em><span style="color: black">/var/named/primary_zone/127.0.0</span></em><span style="color: black"> , il quale appare più o meno così:</span><span style="color: black"></span><span style="color: black"> </span></span><span style="color: black"><span style="font-size: 10pt; color: black; font-family: Courier">$TTL 3D</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier">@<span>               </span>IN<span>      </span>SOA<span>     </span>ns.linux.bogus. hostmaster.linux.bogus. (</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"><span>                                </span>1<span>       </span>; Serial</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"><span>                                </span>8H<span>      </span>; Refresh</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"><span>                                </span>2H<span>      </span>; Retry</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"><span>             </span><span>                   </span>4W<span>      </span>; Expire</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"><span>                                </span>1D)<span>     </span>; Minimum TTL</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"><span>                        </span>NS<span>      </span>ns.linux.bogus.</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier">1<span>                       </span>PTR<span>     </span>localhost.</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"> </span><span style="font-size: 10pt; color: black; font-family: Courier"><span style="color: black">Non ci soffermiamo sul significato di queste righe, in quanto il contenuto di questo file risulterà più chiaro quando tratteremo la configurazione di un name server primario. Per adesso, basti notare come il nome </span><em><span style="color: black">localhost</span></em><span style="color: black"> sia contenuto in un resource record di tipo PTR che, come abbiamo detto nel precedente articolo teorico sul DNS, consente di risalire dall&#8217;IP al corrispondente hostname.</span><span style="color: black"></span><span style="color: black"> </span></span></span></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'">A questo punto, possiamo provare a far partire il nostro server con la configurazione mostrata. Naturalmente si tratta di una configurazione &#8220;essenziale&#8221;, finalizzata esclusivamente alla comprensione del funzionamento di un cache server e che non dovrebbe essere utilizzata, così com&#8217;è, su macchine in produzione. Essa non contiene, ad esempio, nessuna opzione relativa al logging e alla sicurezza, come pure al controllo remoto attraverso l&#8217;utility <strong>rndc</strong> (a tal proposito vedi l&#8217;apposito articolo riservato a tale utility, all&#8217;indirizzo <a href="http://www.space4tutorial.com/?p=22">http://www.space4tutorial.com/?p=22</a>). Inoltre, in questo articolo non affrontiamo le problematiche riguardanti l&#8217;esecuzione di named come utente non privilegiato e l&#8217;esecuzione di questo demone in un &#8220;<em>chrooted environment</em>&#8220;. <span style="font-size: 12pt; color: black; font-family: 'Times New Roman'">Chi fosse interessato a far girare BIND in un&#8217;ambiente sicuro può contattarmi, senza problemi. Appena possibile conto di scrivere un apposito articolo sulle <span style="font-size: 12pt; color: black; font-family: 'Times New Roman'">&#8220;<em>chroot jail</em>&#8221; ovvero le <span style="font-size: 12pt; color: black; font-family: 'Times New Roman'">&#8220;prigioni&#8221; per i processi, sui vantaggi che comportano e sulle problematiche connesse ad esse. <span style="font-size: 12pt; color: black; font-family: 'Times New Roman'">Inoltre, su Internet è disponibile un HOWTO sull&#8217;argomento che tratta proprio il pacchetto BIND, reperibile al link </span><span style="font-size: 12pt; font-family: 'Times New Roman'"><a href="http://www.tldp.org/HOWTO/Chroot-BIND-HOWTO.html"><span class="InternetLink"><span style="font-family: 'Times New Roman'"><font color="#000080">http://www.tldp.org/HOWTO/Chroot-BIND-HOWTO.html</font></span></span></a></span><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'">, oppure al link </span><span style="font-size: 12pt; font-family: 'Times New Roman'"><a href="http://ildp.pluto.it/HOWTO/Chroot-BIND-HOWTO.html"><span class="InternetLink"><span style="font-family: 'Times New Roman'"><font color="#000080">http://ildp.pluto.it/HOWTO/Chroot-BIND-HOWTO.html</font></span></span></a></span><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"> (per la traduzione italiana).</span></span></span></span></span></p>
<p><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"><span style="color: black">Possiamo avviare </span><em><span style="color: black">named</span></em><span style="color: black"> attraverso uno script costruito ad hoc, con </span><strong><span style="color: black">/etc/init.d/named start</span></strong><span style="color: black"> oppure, invocandolo direttamente con </span><strong><span style="color: black">/usr/sbin/named</span></strong><span style="color: black">. Inoltre, possiamo verificarne la corretta esecuzione analizzando il contenuto del file </span><em><span style="color: black">/var/log/messages</span></em><span style="color: black">, con il comando </span><strong><span style="color: black">tail -f /var/log/messages</span></strong><span style="color: black">.</span><span style="color: black"></span><span style="color: black"> </span></span></span></span></span></span><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"><span style="color: black"> </span><span style="color: black">Adesso il nostro server di cache dovrebbe essere in esecuzione. Lo possiamo constatare attraverso l&#8217;utilizzo del comando </span><strong><span style="color: black">netstat -antu</span></strong><span style="color: black"> che, tra le altre righe, dovrebbe mostrare le seguenti:</span><span style="color: black"></span><span style="color: black"> </span></span><span style="color: black"><span style="font-size: 10pt; color: black; font-family: Courier">tcp<span>        </span>0<span>      </span>0<span>    </span>0.0.0.0:53<span>            </span>0.0.0.0:*<span>               </span>LISTEN</span></span></span></span></span></span><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"><span style="color: black"><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier">udp<span>        </span>0<span>      </span>0<span>    </span>0.0.0.0:53<span>          </span><span>  </span>0.0.0.0:*</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="color: black"> </span><span style="color: black">                             <font size="2" face="Courier">LISTEN</font></span><span style="color: black"></span><span style="color: black"><span style="color: black">Esse indicano che il server è attivo ed è in ascolto sulla porta 53, sia UDP che TCP.</span><span style="color: black"></span><span style="color: black"> </span></span></span></span></span></span></span><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"><span style="color: black"><span style="color: black">Per utilizzare questo server, è necessario configurare i client DNS (resolver) in modo da puntare ad esso, modificando il file</span><em><span style="color: black"> /etc/resolv.conf</span></em><span style="color: black"> . Se per le nostre prove vogliamo utilizzare come resolver la stessa macchina sulla quale gira il name server, allora esso dovrà contenere come prima riga:</span><span style="color: black"></span><span style="color: black"> </span><span style="color: black"><span style="font-size: 10pt; color: black; font-family: Courier">nameserver 127.0.0.1</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="color: black"> </span></span><span style="color: black"><span style="color: black">che stabilisce il primo name server a cui fare riferimento. Nel caso in cui il resolver sia un computer diverso da quello su cui è eseguito il server DNS è necessario sostituire l&#8217;indirizzo 127.0.0.1 con l&#8217;indirizzo effettivo del name server. È importante notare che questo file non è utilizzato da named, bensì dalle funzioni di resolving che si occupano di convertire nomi di dominio in indirizzi e viceversa e che, perciò, necessitano di sapere quale server DNS interpellare.</span><span style="color: black"></span><span style="color: black"> </span><span style="color: black"> </span><span style="color: black">Adesso che il name server di cache è in funzione e tutto è stato predisposto per il suo utilizzo, verifichiamone il corretto funzionamento attraverso l&#8217;invio di qualche interrogazione.</span><span style="color: black"></span><span style="color: black">A tale scopo, possiamo utilizzare le utilities </span><strong><span style="color: black">dig</span></strong><span style="color: black"> e </span><strong><span style="color: black">nslookup</span></strong><span style="color: black">, tenendo presente, però, che l&#8217;uso di dig è consigliato, rispetto a nslookup, in quanto quest&#8217;ultimo tool sarà rimosso dalle versioni future di BIND.</span><span style="color: black"></span><span style="color: black">Con dig, ad esempio, digitiamo:</span><span style="color: black"></span><span style="color: black"> </span><span style="color: black"><strong><span style="color: black">dig <a href="http://www.space4tutorial.com/">www.space4tutorial.com</a></span></strong><strong><span style="color: black"></span></strong><span style="color: black"> </span></span></span></span></span></span></span></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify; tab-stops: 63.75pt" class="Default"><span style="color: black">La risposta che otterremo sarà molto simile alla seguente:</span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify; tab-stops: 63.75pt" class="Default"><span style="color: black"></span></p>
<p><span style="color: black"></span><span style="color: black"></span><span style="color: black"></span><span style="color: black"></span><span style="color: black"></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify; tab-stops: 63.75pt" class="Default">; &lt;&lt;&gt;&gt; DiG 9.3.4 &lt;&lt;&gt;&gt; <a href="http://www.space4tutorial.com/">www.space4tutorial.com</a><br />
;; global options:  printcmd<br />
;; Got answer:<br />
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 4247<br />
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 0</p>
<p style="margin: 0cm 0cm 0pt; text-align: justify; tab-stops: 63.75pt" class="Default">;; QUESTION SECTION:<br />
;www.space4tutorial.com.                IN      A</p>
<p style="margin: 0cm 0cm 0pt; text-align: justify; tab-stops: 63.75pt" class="Default">;; ANSWER SECTION:<br />
<a href="http://www.space4tutorial.com/">www.space4tutorial.com</a>. 172800  IN      CNAME   w-04.th.seeweb.it.<br />
w-04.th.seeweb.it.      600     IN      A       217.64.195.226</p>
<p style="margin: 0cm 0cm 0pt; text-align: justify; tab-stops: 63.75pt" class="Default">;; AUTHORITY SECTION:<br />
th.seeweb.it.           600     IN      NS      ns1.th.seeweb.it.<br />
th.seeweb.it.           600     IN      NS      ns2.th.seeweb.it.</p>
<p style="margin: 0cm 0cm 0pt; text-align: justify; tab-stops: 63.75pt" class="Default">;; Query time: 383 msec<br />
;; SERVER: 213.26.137.90#53(213.26.137.90)<br />
;; WHEN: Tue Jul 31 20:15:08 2007<br />
;; MSG SIZE  rcvd: 123</p>
<p style="margin: 0cm 0cm 0pt; text-align: justify; tab-stops: 63.75pt" class="Default">&nbsp;</p>
<p><span style="color: black">Bisogna notare come l&#8217;output di dig sia suddiviso in diverse sezioni, che riguardano i diversi aspetti dell&#8217;interrogazione DNS. Infatti, dig mostra sia le informazioni fondamentali come nome di dominio e indirizzo IP, sia le informazioni relative ai name servers autoritativi per il nome di dominio indicato.</span><span style="color: black"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify; tab-stops: 63.75pt" class="Default"><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify; tab-stops: 63.75pt" class="Default"><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'">Nei successivi articoli tratteremo l&#8217;uso avanzato di questo tool, mentre qui ci soffermiamo su un&#8217;informazione in particolare: il <em>Query time</em>, ovvero, l&#8217;intervallo di tempo intercorso tra il momento in cui abbiamo sottoposto la richiesta al server DNS e l&#8217;istante in cui esso ha restituito la risposta. Nell&#8217;esempio riportato sopra, dig ci dice che il nostro server di cache ha risolto il nome di dominio <a href="http://www.space4tutorial.com/">www.space4tutorial.com</a> in 383 msec.</span></p>
<p><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify; tab-stops: 63.75pt" class="Default"><span style="color: black"></span></p>
<p><span style="color: black">Cosa succede se eseguiamo un&#8217;altra volta lo stesso comando, interrogando il nostro server DNS sullo stesso nome di dominio?</span><span style="color: black"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify; tab-stops: 63.75pt" class="Default"><span style="color: black"></span></p>
<p><span style="color: black">Mostriamo l&#8217;output (ridotto, questa volta, alla parte che ci interessa) relativo alla seconda interrogazione:</span><span style="color: black"></span><span style="font-size: 10pt; color: black; font-family: Courier"> </span><span style="font-size: 10pt; color: black; font-family: Courier"><span style="font-size: 10pt; color: black; font-family: Courier">;; Query time: 1 msec</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier">;; SERVER: 192.168.3.10#53(192.168.3.10)</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier">;; WHEN: Fri Nov 21 12:36:08 2003</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier">;; MSG SIZE<span>  </span>rcvd: 87</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="color: black"> </span></span><span style="font-size: 10pt; color: black; font-family: Courier"><span style="color: black">Ma come è possibile che questa volta abbiamo ottenuto un tempo così basso, addirittura di 1 msec?</span><span style="color: black"></span><span style="color: black">La spiegazione sta nel fatto che il nostro name server la prima volta ha dovuto interrogare a sua volta altri server DNS per ottenere l&#8217;indirizzo IP, mentre adesso, avendo memorizzato nella memoria cache le informazioni ottenute precedentemente, ha fatto ricorso ad essa per fornirci la risposta in tempi assolutamente brevi!</span><span style="color: black"></span><span style="color: black"> </span><span style="color: black"><span style="color: black">Come si può constatare, l&#8217;utilizzo di un name server con funzioni di cache ci permette di migliorare non di poco le performances della risoluzione DNS. Inoltre, se impiegati in una rete intranet, i caching name servers consentono di risolvere i nomi di dominio internamente alla rete stessa. Quindi, in questo modo è possibile ridurre progressivamente, fino alla quasi totale eliminazione, il traffico relativo al DNS sulla rete esterna, ottenendo un miglioramento complessivo delle prestazioni.</span><span style="color: black"></span><span style="color: black"> </span></span></span><span style="font-size: 10pt; color: black; font-family: Courier"> </span><span style="color: black">Bisogna precisare che la cache di cui si parla risiede nella memoria RAM ed è mantenuta da named finché esso è in esecuzione. Pertanto un riavvio di named comporta la perdita del contenuto della cache e quindi delle informazioni memorizzate nel corso del tempo. Inoltre, è importante ricordare che un server di cache offre le prestazioni migliori dopo un certo tempo di utilizzo, perché la cache si riempie di informazioni sui nomi di dominio e c&#8217;è sempre meno bisogno di interrogare altri name servers.</span><span style="color: black"></span><span style="color: black"> </span><span style="color: black"><span style="color: black">Prima di concludere questo articolo sulla configurazione di un name server di cache, affrontiamo un altro aspetto del meccanismo di risoluzione dei nomi di dominio, strettamente collegato al problema del bilanciamento del carico di lavoro tra più servers DNS: il forwarding.</span><span style="color: black"></span><span style="color: black"> </span></span><span style="color: black"><span style="color: black">Il DNS forwarding consente di realizzare una gerarchia di impiego dei servers DNS e, a volte, può essere utilizzato per permettere, a servers che non hanno accesso diretto a Internet, di risolvere comunque i nomi di dominio esterni. Configurando il DNS forwarding possiamo fare in modo che, quando il nostro name server riceve query relative a nomi di dominio non ancora memorizzati nella propria cache, esso risolva le queries ricevute interrogando il server DNS del nostro provider. Quest&#8217;ultimo, nella maggior parte dei casi, sarà in grado di risolvere le queries ricorrendo alla propria cache (contenente molti più nomi di quella del nostro server), producendo perciò delle risposte in un tempo molto più breve. Inoltre, il forwarding allegerirà il nostro name server, il quale non sarà costretto a ricorrere alla risoluzione attraverso i root-servers.</span><span style="color: black"></span><span style="color: black"> </span><span style="color: black"><span style="color: black">Quando si parla di forwarding si deve fare attenzione a non confondere la gerarchia dei nomi di dominio con la gerarchia di impiego dei servers DNS, in quanto quest&#8217;ultimo concetto riguarda le modalità di utilizzo dei servers DNS e non la struttura dei nomi.</span><span style="color: black"></span><span style="color: black"> </span></span></span><span style="color: black"><span style="color: black">La configurazione di un server per il forwarding è molto semplice. Supponendo che il nostro provider abbia due name servers con gli indirizzi IP 11.22.33.44 e 55.66.77.88, l&#8217;unica cosa da fare è aggiungere al file </span><strong><em><span style="color: black">named.conf</span></em></strong><span style="color: black"> le seguenti righe, all&#8217;interno della sezione </span><em><span style="color: black">options</span></em><span style="color: black">:</span><span style="color: black"></span><span style="color: black"> </span><span style="color: black"><span style="font-size: 10pt; color: black; font-family: Courier">options {</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"><span>        </span>&#8230;&#8230;&#8230;&#8230;..</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"><span>        </span>&#8230;&#8230;&#8230;&#8230;..</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"> </span></span><span style="color: black"> </span><span style="font-size: 10pt; color: black; font-family: Courier"><span>        </span>forward first;</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"><span>        </span>forwarders {</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"><span>             </span>11.22.33.44;</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"><span>             </span>55.66.77.88;</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"><span>        </span>};</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier">};</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="color: black"> </span><span style="color: black"><span style="color: black">Come si può facilmente intuire, la prima riga indica che named dovrà ricorrere ai forwarders indicati successivamente e, se essi non rispondono, di provvedere autonomamente alla risoluzione dei nomi. Gli indirizzi indicati nella sezione &#8220;forwarders&#8221;, invece, sono gli indirizzi IP dei name servers del nostro provider.</span><span style="color: black"></span><span style="color: black"> </span></span><span style="color: black"><strong><em><span style="font-size: 16pt; color: black">Concludendo&#8230;</span></em></strong><strong><em><span style="font-size: 16pt; color: black"></span></em></strong><span style="color: black"> </span><span style="color: black"><span style="color: black">Come si può vedere in queste pagine, la configurazione di un name server di cache è un&#8217;operazione piuttosto semplice, una volta che si è compreso il funzionamento logico del Domain Name System. Cionondimeno l&#8217;utilizzo di uno o di più server di cache all&#8217;interno di una rete è di grande importanza, soprattutto in virtù del fatto che, generalmente, la percentuale di traffico DNS di una rete si attesta tra il 4% e il 16% del traffico complessivo.</span><span style="color: black"></span><span style="color: black"> </span></span></span></span></p>
<p></span></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify; tab-stops: 63.75pt" class="Default"><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'">In questo articolo, oltre a descrivere le caratteristiche principali di <em>named</em> quale cache server, abbiamo introdotto alcuni tools utili per l&#8217;interrogazione e la verifica del corretto funzionamento di un server DNS. Nei prossimi articoli, che scriverò appena possibile per Space4Tutorial, vedremo, invece, come si configura <em>named</em> per svolgere funzioni di server primario e secondario e tratteremo l&#8217;uso avanzato di dig e nslookup.</span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify; tab-stops: 63.75pt" class="Default"><span style="font-size: 12pt; color: black; font-family: 'Times New Roman'"></span></p>
<p></font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.space4tutorial.com/2007/07/31/configurare-un-server-dns-di-cache-con-bind/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Controllare named con l&#8217;utility rndc presente in BIND.</title>
		<link>http://www.space4tutorial.com/2007/07/31/controllare-di-named-con-lutility-rndc-presente-in-bind/</link>
		<comments>http://www.space4tutorial.com/2007/07/31/controllare-di-named-con-lutility-rndc-presente-in-bind/#comments</comments>
		<pubDate>Tue, 31 Jul 2007 18:25:16 +0000</pubDate>
		<dc:creator>Roberto Travagliante (HoneyFT)</dc:creator>
				<category><![CDATA[Servizio DNS]]></category>
		<category><![CDATA[Varie]]></category>

		<guid isPermaLink="false">http://www.space4tutorial.com/?p=22</guid>
		<description><![CDATA[Questo mini-tutorial vuole descrivere l&#8217;utilizzo dell&#8217;utility rndc per controllare anche da un computer remoto il processo BIND che gestisce il DNS (Domain Name System).
Livello: Avanzato

Un&#8217;utility piuttosto importante del pacchetto BIND è rndc. Si tratta di un tool per l&#8217;amministrazione locale o remota di named, il quale ha sostituito il programma ndc, fornito con le versioni [...]]]></description>
			<content:encoded><![CDATA[<p>Questo mini-tutorial vuole descrivere l&#8217;utilizzo dell&#8217;utility rndc per controllare anche da un computer remoto il processo BIND che gestisce il DNS (Domain Name System).</p>
<p><strong><em>Livello: Avanzato</em></strong></p>
<p><span id="more-22"></span></p>
<p><font face="Times New Roman"><span style="color: black">Un&#8217;utility piuttosto importante del pacchetto BIND è </span><strong><span style="color: black">rndc</span></strong><span style="color: black">. Si tratta di un tool per l&#8217;amministrazione locale o remota di </span><em><span style="color: black">named</span></em><span style="color: black">, il quale ha sostituito il programma </span><strong><span style="color: black">ndc</span></strong><span style="color: black">, fornito con le versioni del pacchetto BIND precedenti la 9.</span><span style="color: black"></span></font><span style="color: black"><font face="Times New Roman"> </font></span><span style="color: black"><font face="Times New Roman"><span style="color: black">Poiché rndc ha introdotto la possibilità di controllare il demone </span><em><span style="color: black">named</span></em><span style="color: black"> anche da un computer remoto, BIND ha previsto anche un meccanismo a chiave segreta per impedire l&#8217;accesso da parte di hosts non autorizzati. A tal fine, il file di configurazione </span><em><span style="color: black">named.conf</span></em><span style="color: black"> prevede gli statements </span><em><span style="color: black">controls</span></em><span style="color: black"> e </span><em><span style="color: black">key</span></em><span style="color: black"> dei quali mostriamo un esempio:</span><span style="color: black"></span></font><span style="color: black"><font face="Times New Roman"> </font></span></span><span style="color: black"><span style="font-size: 10pt; color: black; font-family: Courier">controls {</span></span><span style="color: black"><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"><span>           </span>inet 127.0.0.1 port 953 allow { 127.0.0.1; }; keys { nome_chiave};</span></span><span style="color: black"><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"><span>           </span>inet 192.168.3.10 allow { 192.168.3.21; } keys { nome_chiave; };</span></span><span style="color: black"><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier">};</span></p>
<p></span><span style="font-size: 10pt; color: black; font-family: Courier"><span style="font-size: 10pt; color: black; font-family: Courier">key &#8220;nome_chiave&#8221; {</span></span></p>
<p><span style="font-size: 10pt; color: black; font-family: Courier"><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"><span>           </span>algorithm hmac-md5;</span></span></p>
<p><span style="font-size: 10pt; color: black; font-family: Courier"><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"><span>           </span>secret &#8220;HKXaVTMuk2NIv7pfkY49oUuKWSyftCwVeRLw5SyftCwVeRJvfbsnZMhZQ&#8221;;</span></span></p>
<p><span style="font-size: 10pt; color: black; font-family: Courier"><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier">};</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"> </span></span><span style="font-size: 10pt; color: black; font-family: Courier"><font face="Times New Roman"><span style="color: black">La sezione </span><em><span style="color: black">controls</span></em><span style="color: black">, alla prima riga, indica che il demone </span><em><span style="color: black">named</span></em><span style="color: black"> resta in ascolto delle richieste di connessione da parte di rndc sulla porta TCP 953 (che è peraltro la porta di default) dell&#8217;indirizzo di loopback e può essere controllato esclusivamente da 127.0.0.1, utilizzando la chiave &lt;nome_chiave&gt;. La riga successiva, stabilisce che esso deve restare in ascolto anche sull&#8217;interfaccia con indirizzo 192.168.3.10 (sulla porta di default, in quanto non specificato) e deve consentire il controllo dall&#8217;host 192.168.3.21, utilizzando la stessa chiave e rifiutando le connessioni iniziate da altri hosts.</span><span style="color: black"></span></font><font face="Times New Roman"><span style="color: black">Invece, la sezione </span><em><span style="color: black">key</span></em><span style="color: black"> descrive la chiave segreta da utilizzare con l&#8217;utility rndc. In particolare, nell&#8217;esempio è riportata una chiave di tipo HMAC-MD5, che può essere generata tramite il comando </span><strong><span style="color: black">dnssec-keygen</span></strong><span style="color: black"> (incluso nel pacchetto BIND). Tale chiave deve essere contenuta anche nel file </span><em><span style="color: black">/etc/rndc.conf</span></em><span style="color: black">, per far sì che rndc funzioni correttamente, come mostrato di seguito:</span></font></span><span style="font-size: 10pt; color: black; font-family: Courier"><span style="color: black"><span style="font-size: 10pt; color: black; font-family: Courier">key chiave_rndc {</span></span></span><span style="font-size: 10pt; color: black; font-family: Courier"><span style="color: black"><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"><span>        </span>algorithm &#8220;hmac-md5&#8243;;</span></span></span><span style="font-size: 10pt; color: black; font-family: Courier"><span style="color: black"><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"><span>        </span>secret &#8220;HKXaVTMuk2NIv7pfkY49oUuKWSyftCwVeRLw5SyftCwVeRJvfbsnZMhZQ&#8221;;</span></span></p>
<p></span><span style="color: black"><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier">};</span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"> </span></span><span style="color: black"> </span><span style="color: black"><span style="font-size: 10pt; color: black; font-family: Courier">options {</span></span><span style="color: black"><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"><span>        </span>default-server<span>  </span>localhost;</span></span><span style="color: black"><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"><span>        </span>default-key<span>     </span>chiave_rndc;</span></span><span style="color: black"><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier">};</span></p>
<p></span><span style="color: black"><font face="Times New Roman"><span style="color: black">Il file </span><em><span style="color: black">rndc.conf</span></em><span style="color: black"> può essere generato facilmente tramite l&#8217;utility </span><strong><span style="color: black">rndc-confgen</span></strong><span style="color: black">, per il cui uso rinviamo alla lettura del manuale: </span><strong><span style="color: black">man rndc-confgen</span></strong><span style="color: black">.</span><span style="color: black"></span></font><font face="Times New Roman"><span style="color: black">L&#8217;utility rndc consente di svolgere diverse operazioni. Per esempio consente di fermare il server named (attenzione, però, perché una volta fermato, named non risulterà più in ascolto sulla rete, pertanto non sarà più possibile farlo ripartire con rndc), permette di ricaricarne la configurazione automaticamente, di mostrarne lo stato (verificando se non vi siano problemi) e così via.</span><span style="color: black"></span></font><font face="Times New Roman"><span style="color: black">Tuttavia, le operazioni di maggiore importanza per ciò che riguarda un name server di cache, sono sicuramente due: </span><em><span style="color: black">dumpdb</span></em><span style="color: black"> e </span><em><span style="color: black">stats</span></em><span style="color: black">. La prima consente di copiare in forma leggibile in un file il contenuto della cache, mentre la seconda permette di ottenere delle statistiche da named in merito alla risoluzione dei nomi, che possono essere utilizzate per verificare che il server di cache funzioni realmente.</span><span style="color: black"></span></font><font face="Times New Roman"><span style="color: black">Digitando al prompt:</span><span style="color: black"></span></font><font face="Times New Roman"><strong><span style="color: black">rndc dumpdb</span></strong><strong><span style="color: black"></span></strong></font><font face="Times New Roman"><span style="color: black">è possibile ottenere il dump della cache nel file </span><em><span style="color: black">/var/named/named_dump.db</span></em><span style="color: black">, salvo che nel file </span><em><span style="color: black">/etc/named.conf</span></em><span style="color: black"> non sia indicato diversamente. Visualizzando questo file (ASCII), quindi, abbiamo la possibilità di vedere quali sono i nomi di dominio che il nostro name server ha memorizzato, cioè quelli per i quali il server è in grado di fornire una risposta autonomamente.</span><span style="color: black"></span></font><font face="Times New Roman"><span style="color: black">Invece, con l&#8217;istruzione:</span><span style="color: black"></span></font><font face="Times New Roman"><strong><span style="color: black">rndc stats</span></strong><strong><span style="color: black"></span></strong></font><font face="Times New Roman"><span style="color: black">possiamo ottenere le statistiche relative alla risoluzione dei nomi (nel file </span><em><span style="color: black">/var/named/named.stats</span></em><span style="color: black">) e, in base ad esse, verificare se il nostro name server di cache funziona a dovere. Le statistiche riguardano vari aspetti, come per esempio il numero di risoluzioni effettuate o fallite, il numero di nomi risolti tramite l&#8217;ausilio di altri name servers e così via. Un file di statistiche generato con rndc appare grossomodo così:</span><span style="color: black"></span></font><span style="color: black"><font face="Times New Roman"> </font></span></span><span style="color: black"><span style="font-size: 10pt; color: black; font-family: Courier">+++ Statistics Dump +++ (1070114005)</span></span><span style="color: black"><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"><span>           </span>success 2699</span></span><span style="color: black"><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"><span>           </span>referral 0</span></span><span style="color: black"><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"><span>           </span>nxrrset 5</span></p>
<p></span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"><span>           </span>nxdomain 509</span></p>
<p><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"><span>           </span>recursion 614</span></p>
<p><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"></span><span style="font-size: 10pt; color: black; font-family: Courier"><span>           </span>failure 7</span></p>
<p><span style="font-size: 10pt; color: black; font-family: Courier">&#8212; Statistics Dump &#8212; (1070114005)</span></p>
<p><span style="font-size: 10pt; color: black; font-family: Courier"><font face="Times New Roman"><span style="color: black">Ai nostri fini, risultano interessanti due voci: </span><em><span style="color: black">success</span></em><span style="color: black">, che indica il numero di queries risolte autonomamente dal server e </span><em><span style="color: black">recursion</span></em><span style="color: black">, che riguarda il numero di interrogazioni che il nostro server ha effettuato presso altri name servers. Se il primo valore è molto alto, rispetto al secondo, allora ciò significa che il nostro server sta risolvendo in proprio la maggior parte dei nomi di dominio, pertanto il suo utilizzo sta apportando effettivamente un contributo all&#8217;efficienza della rete.</span></font><span style="color: black"></span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.space4tutorial.com/2007/07/31/controllare-di-named-con-lutility-rndc-presente-in-bind/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Il DNS (Domain Name System) &#8211; guida teorica</title>
		<link>http://www.space4tutorial.com/2007/07/31/il-dns-domain-name-system-guida-teorica/</link>
		<comments>http://www.space4tutorial.com/2007/07/31/il-dns-domain-name-system-guida-teorica/#comments</comments>
		<pubDate>Tue, 31 Jul 2007 15:04:35 +0000</pubDate>
		<dc:creator>Roberto Travagliante (HoneyFT)</dc:creator>
				<category><![CDATA[Servizio DNS]]></category>
		<category><![CDATA[Varie]]></category>

		<guid isPermaLink="false">http://www.space4tutorial.com/?p=9</guid>
		<description><![CDATA[Vi sottopongo questa Guida teorica relativa al funzionamento del servizio DNS (Domain Name System) per la risoluzione dei nomi di dominio in indirizzi IP. Appena possibile, invierò anche un mini-tutorial per configurare il DNS con il nostro Sistema Operativo preferito. Inviate i vostri commenti, le vostre opinioni, o i vostri suggerimenti, per migliorarla! Grazie!
Livello: tutti

Introduzione 

Se almeno per una volta [...]]]></description>
			<content:encoded><![CDATA[<p>Vi sottopongo questa Guida teorica relativa al funzionamento del servizio DNS (Domain Name System) per la risoluzione dei nomi di dominio in indirizzi IP. Appena possibile, invierò anche un mini-tutorial per configurare il DNS con il nostro Sistema Operativo preferito. Inviate i vostri commenti, le vostre opinioni, o i vostri suggerimenti, per migliorarla! Grazie!</p>
<p><strong><em>Livello: tutti</em></strong></p>
<p><span id="more-9"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"><font face="Times New Roman"><strong><em>Introduzione</em></strong> </font></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"><font face="Times New Roman">Se almeno per una volta abbiamo osservato, attraverso il monitor di un computer, il meraviglioso mondo di Internet, se abbiamo utilizzato un mouse per accedere ad un sito web o<span>  </span>se abbiamo mai scaricato una e-mail da una casella di posta elettronica, allora, molto probabilmente possiamo dire che, almeno per una volta nella nostra vita, abbiamo fatto uso del DNS.</font></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"><font face="Times New Roman">Il servizio DNS, infatti, è uno dei servizi più importanti e più utilizzati di Internet e permette di accedere, in maniera più agevole per l&#8217;utente, a tutti gli altri servizi messi a disposizione dalla rete WAN più importante al mondo.</font></span></p>
<p><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"><font face="Times New Roman">Probabilmente, senza una “comodità” come il DNS il fenomeno Internet non sarebbe mai decollato o comunque non sarebbe come appare oggi ai nostri occhi.</font></span></p>
<p><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"><font face="Times New Roman">Perché, allora, una trattazione sul servizio DNS?</font></span></p>
<p><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"><font face="Times New Roman">Bisogna dire che, purtroppo, a dispetto dell&#8217;importanza che riveste tale servizio, solo pochi conoscono realmente il suo funzionamento. Inoltre, si tratta di un servizio che svolge le proprie funzioni in maniera molto &#8220;discreta&#8221;, non imponendo una vera e propria interazione all&#8217;utente che vuole semplicemente navigare sul web o che vuole fruire di uno specifico servizio messo a disposizione <em>on-line</em>.</font></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"><font face="Times New Roman">Anche tra gli amministratori di rete, molto spesso, il servizio DNS è tabù e non è raro trovare esperti di networking che gettano la spugna dinanzi a un name server che non funziona come dovrebbe (compromettendo il funzionamento complessivo della rete).</font></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"></span></p>
<p align="left" style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"><strong><em><span style="font-size: 14pt" lang="EN-US"></span></em></strong></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"><strong><em><span style="font-size: 14pt" lang="EN-US"><font face="Times New Roman">DNS: chi è costui?</font></span></em></strong><span lang="EN-US"><font face="Times New Roman"> </font></span></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"><font face="Times New Roman">Ma che cosa è il DNS?</font></span></p>
<p><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"><font face="Times New Roman">DNS è l&#8217;acronimo di Domain Name System<em> </em>e indica un sistema di risoluzione dei nomi utilizzato in Internet per fare riferimento a uno specifico host o a un gruppo di hosts.</font></span></p>
<p><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"><font face="Times New Roman">Come sappiamo, ogni host presente su Internet deve essere identificato in maniera univoca da un indirizzo composto da quattro bytes, espresso nella forma a.b.c.d (indirizzo IP).</font></span></p>
<p><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"><font face="Times New Roman">Perciò, se con il nostro PC a casa vogliamo comunicare con il server web che ospita il sito X situato, ad esempio, negli U.S.A., abbiamo bisogno di conoscere l&#8217;indirizzo IP di quel server, in maniera analoga a quanto avviene per le comunicazioni telefoniche, dove abbiamo bisogno del numero di telefono del destinatario.</font></span></p>
<p><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"><font face="Times New Roman">Tuttavia, sarebbe complicato ricordare gli indirizzi IP di tutti i siti che vogliamo visitare, così come sarebbe difficile ricordare i numeri di telefono di tutti i nostri amici o colleghi. Ed ecco che interviene in nostro aiuto il servizio DNS.</font></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"><font face="Times New Roman">In maniera molto simile ad un elenco telefonico, il DNS offre un sistema per tradurre gli indirizzi IP in nomi, sicuramente più semplici da ricordare, per cui, se vogliamo accedere ad esempio al sito web<strong> </strong>contenente l&#8217;ultima versione del kernel Linux, non siamo costretti a ricordare l&#8217;indirizzo IP <strong>217.64.195.226</strong>, ma possiamo utilizzare più agevolmente il nome &#8220;<a href="http://www.space4tutorial.com">www.space4tutorial.com</a>”.</font></span></p>
<p><span lang="EN-US"><span lang="EN-US"></span></span><span lang="EN-US"><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman">Il nome appena mostrato è un nome FQDN (Fully Qualified Domain Name) e indica l&#8217;host <strong>www</strong> presente nel dominio <strong>space4tutorial.com</strong> (nel seguito chiariremo cosa si intende per dominio). <span style="font-size: 12pt; font-family: 'Times New Roman'">Un piccolo chiarimento legato a una credenza diffusa tra i navigatori alle prime armi: <strong>www</strong> è soltanto un nome generalmente utilizzato per indicare computers sui quali girano dei server web; tuttavia, tale nome non è né necessario né sufficiente affinché un host sia un server web. </span></font></span></span></span><span lang="EN-US"></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></font></span></span><span lang="EN-US"><span lang="EN-US"><font face="Times New Roman"><span style="font-size: 12pt; font-family: 'Times New Roman'"></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US">Fornendo al nostro server DNS un nome in questa forma, otterremo, se il nome esiste, il corrispondente indirizzo IP, che successivamente potremo utilizzare per attuare la comunicazione con l&#8217;host di destinazione.</span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"></span></p>
<p><span lang="EN-US"></span><span lang="EN-US"><span lang="EN-US"><strong><em><span style="font-size: 14pt" lang="EN-US">Organizzazione delle informazioni gestite dal DNS</span></em></strong><span lang="EN-US"> </span></span></span><span lang="EN-US"><span lang="EN-US"></span></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"> </span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US">Prima di descrivere il funzionamento del Domain Name System, bisogna notare che esso è un sistema statico, vale a dire che l&#8217;aggiunta, la modifica, o la rimozione delle informazioni non avviene in maniera automatica, ma deve essere effettuata manualmente dall&#8217;amministratore del server DNS responsabile per quelle informazioni.</span></p>
<p><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US">Si tratta, inoltre, di un sistema che realizza una struttura gerarchica distribuita. Questo significa che non esiste un unico server DNS che conserva tutte le corrispondenze dei nomi Internet, ma che il suo funzionamento complessivo dipende da migliaia di server DNS presenti sulla rete. Pertanto, se uno di essi subisce un&#8217;interruzione per guasto o per altri motivi, il servizio continua a funzionare senza impedimenti.</span></p>
<p><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US">Infine, il DNS si basa su un&#8217;architettura di tipo client-server (come molti altri servizi Internet), vale a dire che abbiamo sempre una macchina che effettua una richiesta di risoluzione di un nome detta appunto “<em>resolver”</em> e un&#8217;altra che fornisce il servizio di risoluzione (server). Naturalmente, come avviene per qualsiasi altro servizio basato sulla suite di protocolli TCP/IP, client e server possono risiedere sullo stesso computer.</span></p>
<p><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US">I nomi di dominio sono organizzati secondo una struttura ad albero capovolto, che costituisce il &#8220;name space&#8221;. La radice dell&#8217;albero è detta “<em>radice non denominata</em>” o più semplicemente dominio “<em>root</em>” ed è rappresentata da un punto “.”. I nodi interni descrivono i “<strong><em>domini</em></strong><em>”</em>. Un dominio consiste in un&#8217;insieme di nomi che discendono da uno stesso nodo. Trattandosi di un&#8217;albero, inoltre, un dominio può essere suddiviso ulteriormente in più sotto-domini. Le foglie, infine, rappresentano i nomi degli hosts.</span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"><a href="/wp-content/uploads/name-space.png"><img width="638" src="/wp-content/uploads/name-space.png" alt="Organizzazione dello spazio dei nomi DNS" height="484" style="width: 638px; height: 484px" title="Organizzazione dello spazio dei nomi DNS" /></a></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"> </span><span lang="EN-US"><span lang="EN-US"><strong>Fig. 1: L&#8217;organizzazione del name space per i nomi di dominio.</strong></span></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US"><span lang="EN-US"></span></span></p>
<p><span lang="EN-US"><span lang="EN-US"></span></span><span lang="EN-US"><span lang="EN-US"></span></span><span lang="EN-US"><span lang="EN-US"></span></span><span lang="EN-US"><span lang="EN-US"></span></span><span lang="EN-US"><span lang="EN-US"></span></span><span lang="EN-US"><span lang="EN-US"></span></span><span lang="EN-US"><span lang="EN-US"></span></span><span lang="EN-US"><span lang="EN-US"></span></span><span lang="EN-US"><span lang="EN-US"></span></span><span lang="EN-US"><span lang="EN-US"></span></span><span lang="EN-US"><span lang="EN-US"></span></span><span lang="EN-US"><span lang="EN-US"></span></span><span lang="EN-US"><span lang="EN-US"></span></span><span lang="EN-US"><span lang="EN-US"></span></span><span lang="EN-US"><span lang="EN-US"></span></span><span lang="EN-US"><span lang="EN-US"></span></span><span lang="EN-US"><span lang="EN-US"></span></span><span lang="EN-US"><span lang="EN-US"></span></span><span lang="EN-US"><span lang="EN-US"></span></span><span lang="EN-US"><span lang="EN-US"></span></span><span lang="EN-US"><span lang="EN-US"></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US">Attraverso quest&#8217;albero è possibile ottenere il nome FQDN di una macchina presente su Internet.</span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US">Un nome FQDN è un nome di dominio che include tutti i domini di livello superiore e, per questo, è detto anche nome di dominio completo. Esso è composto da una sequenza di più etichette separate tra loro da punti. Nomi di dominio validi, possono essere <strong>www.ietf.org</strong>, <strong>setiathome.ssl.berkeley.edu</strong>, ecc.</span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US">Come si evince dallo schema in <strong>Fig. 1</strong>, per esempio, il nome FQDN <strong><a href="http://www.space4tutorial.com/">www.space4tutorial.com</a>.</strong>, relativo al sito web di questo blog<em>, </em>rappresenta l&#8217;host <strong>www</strong> appartenente al dominio <strong>space4tutorial</strong>. A sua volta, il dominio<strong> space4tutorial </strong>è contenuto nel dominio <strong>com</strong>, il quale discende dal dominio radice (“.”).</span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US">A questo punto è necessario fare una precisazione: i nomi “<strong>www.space4tutorial.com”</strong> e <strong>“www.space4tutorial.com.”</strong> (seguito dal punto finale) sono perfettamente identici, agli occhi del DNS. Questo perché il punto è suffisso implicito di ogni nome di dominio e può essere omesso (come d&#8217;altronde avviene nella maggior parte dei casi). Inoltre, il DNS considera lettere maiuscole e minuscole allo stesso modo (in altre parole, non è <em>case-sensitive</em>), pertanto “<strong>WHOIS.RIPE.NET</strong>” è perfettamente identico a “<strong>whois.ripe.net</strong>”.</span></p>
<p><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span style="font-size: 12pt; font-family: 'Times New Roman'">Nella gerarchia dei nomi DNS, immediatamente al di sotto del dominio radice, si trovano i nomi dei domini di primo livello (<em>Top Level Domain</em> o <em>TLD</em>). Alcuni di questi domini indicano una collocazione geografica e sono chiamati <em>ccTLD (country code TLD</em>), mentre altri, indicati a volte come <em>gTLD </em>(<em>generic TLD</em>), possono indicare una tipologia giuridica o delle finalità specifiche (in <strong>Tabella 1</strong> sono riportati degli esempi).</span></p>
<p><span style="font-size: 12pt; font-family: 'Times New Roman'"><span lang="EN-US"></span></span><span style="font-size: 12pt; font-family: 'Times New Roman'"><span lang="EN-US"></span></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></p>
<table border="0" cellPadding="0" cellSpacing="0" style="margin: auto auto auto 1.4pt; border-collapse: collapse" class="MsoNormalTable">
<thead>
<td width="59" vAlign="top" style="border-right: #ece9d8; padding-right: 1.4pt; border-top: black 1pt solid; padding-left: 1.4pt; padding-bottom: 0cm; border-left: black 1pt solid; width: 44.25pt; padding-top: 0cm; border-bottom: black 1pt solid; background-color: transparent">
<p style="margin: 0cm 0cm 0pt" class="TableHeading"><span lang="EN-US"><font size="3" face="Times New Roman"><strong><em>ccTLD</em></strong></font></span></p>
</td>
<td width="157" vAlign="top" style="border-right: #ece9d8; padding-right: 1.4pt; border-top: black 1pt solid; padding-left: 1.4pt; padding-bottom: 0cm; border-left: black 1pt solid; width: 117.75pt; padding-top: 0cm; border-bottom: black 1pt solid; background-color: transparent">
<p style="margin: 0cm 0cm 0pt" class="TableHeading"><span lang="EN-US"><font size="3" face="Times New Roman"><strong><em>Paese indicato</em></strong></font></span></p>
</td>
<td width="67" vAlign="top" style="border-right: #ece9d8; padding-right: 1.4pt; border-top: black 1pt solid; padding-left: 1.4pt; padding-bottom: 0cm; border-left: black 1pt solid; width: 50.25pt; padding-top: 0cm; border-bottom: black 1pt solid; background-color: transparent">
<p style="margin: 0cm 0cm 0pt" class="TableHeading"><span lang="EN-US"><font size="3" face="Times New Roman"><strong><em>gTLD</em></strong></font></span></p>
</td>
<td width="359" vAlign="top" style="padding-right: 1.4pt; padding-left: 1.4pt; padding-bottom: 0cm; width: 269.6pt; padding-top: 0cm; background-color: transparent; border: black 1pt solid">
<p style="margin: 0cm 0cm 0pt" class="TableHeading"><span lang="EN-US"><strong><em><font size="3" face="Times New Roman">Tipo di organizzazione</font></em></strong></span></p>
</td>
</tr>
<tr>
<td width="59" vAlign="top" style="border-right: #ece9d8; padding-right: 1.4pt; border-top: #ece9d8; padding-left: 1.4pt; padding-bottom: 0cm; border-left: black 1pt solid; width: 44.25pt; padding-top: 0cm; border-bottom: black 1pt solid; background-color: transparent">
<p align="center" style="margin: 0cm 0cm 0pt; text-align: center" class="TableContents"><span lang="EN-US"><font size="3" face="Times New Roman">.it</font></span></p>
</td>
<td width="157" vAlign="top" style="border-right: #ece9d8; padding-right: 1.4pt; border-top: #ece9d8; padding-left: 1.4pt; padding-bottom: 0cm; border-left: black 1pt solid; width: 117.75pt; padding-top: 0cm; border-bottom: black 1pt solid; background-color: transparent">
<p align="center" style="margin: 0cm 0cm 0pt; text-align: center" class="TableContents"><span lang="EN-US"><font size="3" face="Times New Roman">Italia</font></span></p>
</td>
<td width="67" vAlign="top" style="border-right: #ece9d8; padding-right: 1.4pt; border-top: #ece9d8; padding-left: 1.4pt; padding-bottom: 0cm; border-left: black 1pt solid; width: 50.25pt; padding-top: 0cm; border-bottom: black 1pt solid; background-color: transparent">
<p align="center" style="margin: 0cm 0cm 0pt; text-align: center" class="TableContents"><span lang="EN-US"><font size="3" face="Times New Roman">.com</font></span></p>
</td>
<td width="359" vAlign="top" style="border-right: black 1pt solid; padding-right: 1.4pt; border-top: #ece9d8; padding-left: 1.4pt; padding-bottom: 0cm; border-left: black 1pt solid; width: 269.6pt; padding-top: 0cm; border-bottom: black 1pt solid; background-color: transparent">
<p style="margin: 0cm 0cm 0pt" class="TableContents"><span lang="EN-US"><font size="3" face="Times New Roman">Organizzazioni che svolgono attività commerciali</font></span></p>
</td>
</tr>
<tr>
<td width="59" vAlign="top" style="border-right: #ece9d8; padding-right: 1.4pt; border-top: #ece9d8; padding-left: 1.4pt; padding-bottom: 0cm; border-left: black 1pt solid; width: 44.25pt; padding-top: 0cm; border-bottom: black 1pt solid; background-color: transparent">
<p align="center" style="margin: 0cm 0cm 0pt; text-align: center" class="TableContents"><span lang="EN-US"><font size="3" face="Times New Roman">.de</font></span></p>
</td>
<td width="157" vAlign="top" style="border-right: #ece9d8; padding-right: 1.4pt; border-top: #ece9d8; padding-left: 1.4pt; padding-bottom: 0cm; border-left: black 1pt solid; width: 117.75pt; padding-top: 0cm; border-bottom: black 1pt solid; background-color: transparent">
<p align="center" style="margin: 0cm 0cm 0pt; text-align: center" class="TableContents"><span lang="EN-US"><font size="3" face="Times New Roman">Germania</font></span></p>
</td>
<td width="67" vAlign="top" style="border-right: #ece9d8; padding-right: 1.4pt; border-top: #ece9d8; padding-left: 1.4pt; padding-bottom: 0cm; border-left: black 1pt solid; width: 50.25pt; padding-top: 0cm; border-bottom: black 1pt solid; background-color: transparent">
<p align="center" style="margin: 0cm 0cm 0pt; text-align: center" class="TableContents"><span lang="EN-US"><font size="3" face="Times New Roman">.org</font></span></p>
</td>
<td width="359" vAlign="top" style="border-right: black 1pt solid; padding-right: 1.4pt; border-top: #ece9d8; padding-left: 1.4pt; padding-bottom: 0cm; border-left: black 1pt solid; width: 269.6pt; padding-top: 0cm; border-bottom: black 1pt solid; background-color: transparent">
<p style="margin: 0cm 0cm 0pt" class="TableContents"><span lang="EN-US"><font size="3" face="Times New Roman">Organizzazioni senza fini di lucro</font></span></p>
</td>
</tr>
<tr>
<td width="59" vAlign="top" style="border-right: #ece9d8; padding-right: 1.4pt; border-top: #ece9d8; padding-left: 1.4pt; padding-bottom: 0cm; border-left: black 1pt solid; width: 44.25pt; padding-top: 0cm; border-bottom: black 1pt solid; background-color: transparent">
<p align="center" style="margin: 0cm 0cm 0pt; text-align: center" class="TableContents"><span lang="EN-US"><font size="3" face="Times New Roman">.uk</font></span></p>
</td>
<td width="157" vAlign="top" style="border-right: #ece9d8; padding-right: 1.4pt; border-top: #ece9d8; padding-left: 1.4pt; padding-bottom: 0cm; border-left: black 1pt solid; width: 117.75pt; padding-top: 0cm; border-bottom: black 1pt solid; background-color: transparent">
<p align="center" style="margin: 0cm 0cm 0pt; text-align: center" class="TableContents"><span lang="EN-US"><font size="3" face="Times New Roman">Regno Unito</font></span></p>
</td>
<td width="67" vAlign="top" style="border-right: #ece9d8; padding-right: 1.4pt; border-top: #ece9d8; padding-left: 1.4pt; padding-bottom: 0cm; border-left: black 1pt solid; width: 50.25pt; padding-top: 0cm; border-bottom: black 1pt solid; background-color: transparent">
<p align="center" style="margin: 0cm 0cm 0pt; text-align: center" class="TableContents"><span lang="EN-US"><font size="3" face="Times New Roman">.net</font></span></p>
</td>
<td width="359" vAlign="top" style="border-right: black 1pt solid; padding-right: 1.4pt; border-top: #ece9d8; padding-left: 1.4pt; padding-bottom: 0cm; border-left: black 1pt solid; width: 269.6pt; padding-top: 0cm; border-bottom: black 1pt solid; background-color: transparent">
<p style="margin: 0cm 0cm 0pt" class="TableContents"><span lang="EN-US"><font size="3" face="Times New Roman">Organizzazioni che svolgono attività orientate alla rete</font></span></p>
</td>
</tr>
<tr>
<td width="59" vAlign="top" style="border-right: #ece9d8; padding-right: 1.4pt; border-top: #ece9d8; padding-left: 1.4pt; padding-bottom: 0cm; border-left: black 1pt solid; width: 44.25pt; padding-top: 0cm; border-bottom: black 1pt solid; background-color: transparent">
<p align="center" style="margin: 0cm 0cm 0pt; text-align: center" class="TableContents"><span lang="EN-US"><font size="3" face="Times New Roman">.jp</font></span></p>
</td>
<td width="157" vAlign="top" style="border-right: #ece9d8; padding-right: 1.4pt; border-top: #ece9d8; padding-left: 1.4pt; padding-bottom: 0cm; border-left: black 1pt solid; width: 117.75pt; padding-top: 0cm; border-bottom: black 1pt solid; background-color: transparent">
<p align="center" style="margin: 0cm 0cm 0pt; text-align: center" class="TableContents"><span lang="EN-US"><font size="3" face="Times New Roman">Giappone</font></span></p>
</td>
<td width="67" vAlign="top" style="border-right: #ece9d8; padding-right: 1.4pt; border-top: #ece9d8; padding-left: 1.4pt; padding-bottom: 0cm; border-left: black 1pt solid; width: 50.25pt; padding-top: 0cm; border-bottom: black 1pt solid; background-color: transparent">
<p align="center" style="margin: 0cm 0cm 0pt; text-align: center" class="TableContents"><span lang="EN-US"><font size="3" face="Times New Roman">.edu</font></span></p>
</td>
<td width="359" vAlign="top" style="border-right: black 1pt solid; padding-right: 1.4pt; border-top: #ece9d8; padding-left: 1.4pt; padding-bottom: 0cm; border-left: black 1pt solid; width: 269.6pt; padding-top: 0cm; border-bottom: black 1pt solid; background-color: transparent">
<p style="margin: 0cm 0cm 0pt" class="TableContents"><span lang="EN-US"><font size="3" face="Times New Roman">Enti con finalità educative</font></span></p>
</td>
</tr>
<tr>
<td width="59" vAlign="top" style="border-right: #ece9d8; padding-right: 1.4pt; border-top: #ece9d8; padding-left: 1.4pt; padding-bottom: 0cm; border-left: black 1pt solid; width: 44.25pt; padding-top: 0cm; border-bottom: black 1pt solid; background-color: transparent">
<p align="center" style="margin: 0cm 0cm 0pt; text-align: center" class="TableContents"><span lang="EN-US"><font size="3" face="Times New Roman">.us</font></span></p>
</td>
<td width="157" vAlign="top" style="border-right: #ece9d8; padding-right: 1.4pt; border-top: #ece9d8; padding-left: 1.4pt; padding-bottom: 0cm; border-left: black 1pt solid; width: 117.75pt; padding-top: 0cm; border-bottom: black 1pt solid; background-color: transparent">
<p align="center" style="margin: 0cm 0cm 0pt; text-align: center" class="TableContents"><span lang="EN-US"><font size="3" face="Times New Roman">Stati Uniti</font></span></p>
</td>
<td width="67" vAlign="top" style="border-right: #ece9d8; padding-right: 1.4pt; border-top: #ece9d8; padding-left: 1.4pt; padding-bottom: 0cm; border-left: black 1pt solid; width: 50.25pt; padding-top: 0cm; border-bottom: black 1pt solid; background-color: transparent">
<p align="center" style="margin: 0cm 0cm 0pt; text-align: center" class="TableContents"><span lang="EN-US"><font size="3" face="Times New Roman">.mil</font></span></p>
</td>
<td width="359" vAlign="top" style="border-right: black 1pt solid; padding-right: 1.4pt; border-top: #ece9d8; padding-left: 1.4pt; padding-bottom: 0cm; border-left: black 1pt solid; width: 269.6pt; padding-top: 0cm; border-bottom: black 1pt solid; background-color: transparent">
<p style="margin: 0cm 0cm 0pt" class="TableContents"><span lang="EN-US"><font size="3" face="Times New Roman">Organizzazioni con scopi militari</font></span></p>
</td>
</tr>
<tr>
<td width="59" vAlign="top" style="border-right: #ece9d8; padding-right: 1.4pt; border-top: #ece9d8; padding-left: 1.4pt; padding-bottom: 0cm; border-left: black 1pt solid; width: 44.25pt; padding-top: 0cm; border-bottom: black 1pt solid; background-color: transparent">
<p align="center" style="margin: 0cm 0cm 0pt; text-align: center" class="TableContents"><span lang="EN-US"><font size="3" face="Times New Roman">.sg</font></span></p>
</td>
<td width="157" vAlign="top" style="border-right: #ece9d8; padding-right: 1.4pt; border-top: #ece9d8; padding-left: 1.4pt; padding-bottom: 0cm; border-left: black 1pt solid; width: 117.75pt; padding-top: 0cm; border-bottom: black 1pt solid; background-color: transparent">
<p align="center" style="margin: 0cm 0cm 0pt; text-align: center" class="TableContents"><span lang="EN-US"><font size="3" face="Times New Roman">Singapore</font></span></p>
</td>
<td width="67" vAlign="top" style="border-right: #ece9d8; padding-right: 1.4pt; border-top: #ece9d8; padding-left: 1.4pt; padding-bottom: 0cm; border-left: black 1pt solid; width: 50.25pt; padding-top: 0cm; border-bottom: black 1pt solid; background-color: transparent">
<p align="center" style="margin: 0cm 0cm 0pt; text-align: center" class="TableContents"><span lang="EN-US"><font size="3" face="Times New Roman">.gov</font></span></p>
</td>
<td width="359" vAlign="top" style="border-right: black 1pt solid; padding-right: 1.4pt; border-top: #ece9d8; padding-left: 1.4pt; padding-bottom: 0cm; border-left: black 1pt solid; width: 269.6pt; padding-top: 0cm; border-bottom: black 1pt solid; background-color: transparent">
<p style="margin: 0cm 0cm 0pt" class="TableContents"><span lang="EN-US"><font size="3" face="Times New Roman">Enti governativi</font></span></p>
</td>
</tr>
</table>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><strong><span lang="EN-US">Tabella 1</span></strong><span lang="EN-US">: Esempi di domini Top Level. Alcuni domini ccTLD sono ulteriormente suddivisi in sotto-domini che rappresentano specifiche regioni geografiche di un determinato Paese (es: .wv.us – West Virginia – United States).</span></p>
<p><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US">Per quanto riguarda il dominio radice, bisogna dire che su Internet esistono circa una dozzina di server DNS radice, contenenti le medesime informazioni, utilizzati per garantire, in caso di indisponibilità di uno di essi, il corretto funzionamento del servizio.</span></p>
<p><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span style="font-size: 12pt; font-family: 'Times New Roman'">Al di sotto dei domini TLD, ritroviamo i diversi domini (eventualmente suddivisi in ulteriori sotto-domini) e i nomi delle singole macchine.</span> </p>
<p><span lang="EN-US"></span><span lang="EN-US"><strong><em><span style="font-size: 16pt" lang="EN-US">Come funziona il DNS?</span></em></strong><span lang="EN-US"> </span></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US">Detto questo, analizziamo nel dettaglio il meccanismo di interrogazione del DNS, attraverso un esempio pratico (Vedi <strong>Fig. 2</strong>).</span></p>
<p><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US">Se digitiamo l&#8217;indirizzo <strong>www.kernel.org</strong> nella barra degli indirizzi del nostro browser preferito, il nostro computer chiede ad un server DNS di risolvere il nome fornito (1), restituendoci il corrispondente indirizzo IP, che successivamente sarà utilizzato per stabilire la connessione con la macchina remota che ospita il server Web capace di restituire contenuti html.</span></p>
<p><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US">Il server DNS da noi interpellato, generalmente è il server del nostro provider Internet, ma potrebbe anche essere un server diverso (ad esempio, se il computer fa parte di una rete connessa ad Internet, potrebbe trattarsi di un server DNS interno alla rete stessa). Comunque, il funzionamento non cambia.</span></p>
<p><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US">Il server DNS verifica prima di tutto se possiede l&#8217;indirizzo IP corrispondente al nome da risolvere. Potrebbe, infatti, essere in grado di risolvere autonomamente quel nome, perché contiene le informazioni relative ad esso oppure perché tale nome è già stato risolto in precedenza. In caso contrario, esso interroga uno dei root servers (2), dando inizio al processo di ricerca delle informazioni da noi richieste all&#8217;interno della gerarchia dei nomi di dominio.</span></p>
<p><span lang="EN-US"><a target="_new" href="/wp-content/uploads/querying-dns.png"><img width="626" src="/wp-content/uploads/querying-dns.png" alt="Il meccanismo di querying (interrogazione del DNS)" height="485" style="width: 626px; height: 485px" title="Il meccanismo di querying (interrogazione del DNS)" /></a></span></p>
<p><span lang="EN-US"><strong> <span style="font-size: 12pt; font-family: 'Times New Roman'">Fig. 2: Il meccanismo di querying (interrogazione) del DNS</span></strong></span></p>
<p><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></span><span lang="EN-US"></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US">Come si può vedere dalla <strong>Fig. 2</strong>, il root server interrogato, fornisce al nostro server DNS l&#8217;indicazione del server responsabile per lo spazio dei nomi <strong>.org</strong> (3). Successivamente, il nostro server inoltra la stessa richiesta a quest&#8217;ultimo (4), che non è in grado di risolvere completamente il nome <strong>www.kernel.org</strong>, ma che è in grado di indicarci il server che può farlo (5), cioè il server responsabile per la zona <strong>kernel.org</strong>. Il processo di risoluzione si conclude inoltrando la richiesta a questo server (6), il quale riconosce il nome <strong>www</strong> come facente parte della zona <strong>kernel.org</strong> e restituisce l&#8217;indirizzo IP corrispondente (7 e 8).</span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US">Prima di andare avanti è necessario chiarire il concetto di <strong><em>zona</em></strong>. Una zona consiste in un dominio, o un insieme di domini che ricadono sotto la responsabilità di un server DNS. In altre parole, una zona è un sottoinsieme del name space, contenente uno o più domini gestiti dallo stesso name server. Quest&#8217;ultimo è detto “<em>server autoritativo</em>” per quella zona.</span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US">È interessante notare come lo stesso server DNS possa gestire zone diverse, diventando server autoritativo per esse.</span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US">A volte, i concetti di dominio e di zona sono considerati intercambiabili. Tuttavia, si tratta di due entità distinte. Infatti, il dominio rappresenta un insieme di nomi raggruppati in base ad un determinato criterio (es: i nomi delle macchine che riguardano un&#8217;azienda, un Paese, ecc.), mentre una zona comprende le informazioni su un dominio o su parte di esso mantenute da un server specifico.</span></p>
<p><span style="font-size: 12pt; font-family: 'Times New Roman'">Detto questo, esaminiamo i diversi tipi di server DNS. In particolare abbiamo:</span></p>
<ul>
<li><span style="font-size: 12pt; font-family: 'Times New Roman'"><strong>Servers primari:</strong> <span style="font-size: 12pt; font-family: 'Times New Roman'">sono servers principali, responsabili della gestione delle informazioni relative ad una determinata zona (di autorità).</span></span></li>
<li><span style="font-size: 12pt; font-family: 'Times New Roman'"><span style="font-size: 12pt; font-family: 'Times New Roman'"><strong>Servers secondari:</strong> <span style="font-size: 12pt; font-family: 'Times New Roman'">servers utilizzati per realizzare la ridondanza delle informazioni conservate dai server primari. Un server secondario conserva una copia delle informazioni presenti sul name server primario, informazioni ottenenute attraverso una operazione denominata “<em>trasferimento di zona</em>” o “<em>zone transfer</em>”. I servers secondari sono utilizzati, quindi, principalmente come server di backup da utilizzare nel caso in cui il server primario sia non disponibile e svolgono anche una funzione di bilanciamento del carico nel caso in cui si debba far fronte ad un numero eccessivo di richieste. A fronte di un server primario, è possibile avere diversi servers secondari.</span></span></span></li>
<li><span style="font-size: 12pt; font-family: 'Times New Roman'"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></span><span lang="EN-US"><strong>Servers di cache:</strong> <span style="font-size: 12pt; font-family: 'Times New Roman'">sono servers la cui funzione principale è migliorare l&#8217;efficienza nella risoluzione dei nomi di dominio. Essi sono molto utilizzati all&#8217;interno di reti LAN e memorizzano le risposte ottenute da altri servers DNS in un&#8217;apposita cache, per il successivo utilizzo. Questa cache, si riempie progressivamente, sicché, dopo un certo tempo di utilizzo, il maggior numero di nomi di dominio sia risolvibile senza far capo ad altri server DNS, abbreviando progressivamente i tempi di attesa per la risoluzione.</span></span></li>
</ul>
<p></span><span lang="EN-US"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></span></span><span lang="EN-US"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></span></span></span><span lang="EN-US"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></span></span></span><span lang="EN-US"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></span><span lang="EN-US"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></span><span lang="EN-US"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></span><span lang="EN-US"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></span><span lang="EN-US"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></span><span lang="EN-US"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></span><span lang="EN-US"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></span><span lang="EN-US"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></span><span lang="EN-US"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></span><span lang="EN-US"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></span><span lang="EN-US"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></span><span lang="EN-US"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></span><span lang="EN-US"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></span><span lang="EN-US"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></span><span lang="EN-US"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></span><span lang="EN-US"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></span><span lang="EN-US"><span style="font-size: 12pt; font-family: 'Times New Roman'"></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US">Bisogna fare una considerazione di carattere strategico: dato che dalla velocità di risoluzione dei nomi di dominio dipende l&#8217;efficienza dell&#8217;intera rete, il servizio di DNS è stato progettato per utilizzare principalmente il protocollo UDP (porta 53), caratterizzato da una semplicità intrinseca, tipica dei protocolli connection-less. Tuttavia, per i trasferimenti di zona, esso si appoggia al protocollo TCP, più affidabile. In questi casi, infatti, è necessaria la garanzia che i dati trasferiti non vengano alterati durante la copia presso i name server secondari.</span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US">Tra le informazioni contenute in un messaggio DNS, assume particolare importanza il “<em>Resource Record</em>” o record di risorsa (RR), il quale descrive il contenuto del messaggio stesso. Un name server può infatti inviare messaggi di diverso tipo, a seconda delle interrogazioni che esso riceve. Di seguito indichiamo i RR principali, con il relativo significato:</span></p>
<p><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US">A = (Address) indirizzo IP corrispondente al nome di dominio richiesto al DNS;</span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US">SOA = (Start Of Authority) informazioni sull&#8217;autorità per il dominio richiesto;</span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US">MX = (Mail eXchange) Host utilizzato come centrale postale per il dominio;</span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US">CNAME = (Canonical NAME) definisce un alias da utilizzare nell&#8217;ambito del dominio;</span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US">NS = (Name Server) nome del server di autorità per il dominio;</span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US">TXT = (TeXT) Testo arbitrario, utilizzato per fornire ulteriori informazioni;</span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US">PTR = (PoinTeR) puntatore utilizzato nella risoluzione inversa, che permette di ottenere, da un indirizzo IP, il nome di dominio corrispondente.</span></p>
<p><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US">I Resource Records sono un elemento molto importante, nell&#8217;ambito del funzionamento del DNS. Essi permettono, ad esempio, di distinguere se un server ha restituito una risposta contenente l&#8217;indirizzo di un nome risolto (tipo A) oppure se tale risposta contiene il nome di un altro server responsabile di una specifica zona (tipo NS), al quale va inoltrata la richiesta. Inoltre, offrono all&#8217;amministratore la possibilità di creare più alias di uno stesso nome o di fornire informazioni supplementari che non riguardano direttamente la risoluzione degli indirizzi (es: il tipo TXT).</span></p>
<p><span style="font-size: 12pt; font-family: 'Times New Roman'">Due parole, in particolare, vanno spese per il tipo PTR: il DNS, oltre a consentirci di risalire, partendo dal nome di dominio, ad uno specifico indirizzo IP, ci permette di effettuare l&#8217;operazione inversa, cioè, conoscendo l&#8217;indirizzo IP, possiamo ottenere il relativo nome di dominio. A tal fine, il Domain Name System prevede un dominio speciale, denominato “<strong><em>.in-addr.arpa</em></strong>” (in-addr come internet address, arpa come ARPANet, la rete dalla quale è nata Internet), il quale può essere utilizzato, in abbinamento con un indirizzo IP o con parte di esso, per ottenerne il nome di dominio corrispondente. Ad esempio, se vogliamo ottenere il nome corrispondente all&#8217;indirizzo 192.0.34.161, possiamo interrogare il nostro name server (tramite utility di querying DNS come dig o nslookup) chiedendo di risolvere “<strong>161.34.0.192.in-addr.arpa</strong>“ e ottenendo il nome di dominio “<strong>www.internic.net</strong>”. Notiamo come l&#8217;indirizzo IP debba essere indicato nella forma inversa, ovvero dall&#8217;ottetto meno significativo al più significativo (allo stesso modo dei nomi di dominio, che vanno dal nome più specifico al più generico).</span></p>
<p><span style="font-size: 12pt; font-family: 'Times New Roman'"><span lang="EN-US"></span></span><span style="font-size: 12pt; font-family: 'Times New Roman'"><span lang="EN-US"><strong><em><span style="font-size: 16pt" lang="EN-US">Voglio anche io il mio nome di dominio!!!</span></em></strong><span lang="EN-US"> </span></span></span><span style="font-size: 12pt; font-family: 'Times New Roman'"><span lang="EN-US"></span></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US">Dopo esserci soffermati sugli aspetti teorici dell&#8217;argomento, concludiamo vedendo come si ottiene un nome di dominio, ad esempio, per il nostro nuovo portale web, oppure perché vogliamo proiettare la parte pubblica della nostra rete su Internet e vogliamo che essa sia raggiungibile dall&#8217;esterno.</span></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US">Possiamo utilizzare i DNS del nostro provider, delegando ad esso l&#8217;onere delle pratiche burocratiche necessarie alla registrazione del nuovo nome di dominio, oppure possiamo decidere di gestire il nostro server DNS in autonomia. Se optiamo per quest&#8217;ultima scelta, allora dobbiamo rivolgerci direttamente alla <em>Registration Autority (RA)</em> competente, a seconda del dominio TLD sotto il quale vogliamo inserire il nostro nome. Le Registration Autorities sono coordinate da un&#8217;istituzione “super-partes” che è l&#8217;I.A.N.A. (Internet Assigned Numbers Authority). Dalla pagina <a href="http://www.iana.org/cctld/cctld-whois.htm"><span class="InternetLink"><font color="#000080">http://www.iana.org/cctld/cctld-whois.htm</font></span></a> è possibile raggiungere i links delle diverse RAs, relative ai domini TLD di tutto il mondo.</span></p>
<p><span style="font-size: 12pt; font-family: 'Times New Roman'">Per il dominio .it, ad esempio, è responsabile la Registration Autority Italiana raggiungibile all&#8217;indirizzo <a href="http://www.nic.it/RA"><span class="InternetLink"><font color="#000080">http://www.nic.it/RA/</font></span></a>. Se desideriamo un dominio nel TLD .it, dobbiamo effettuare la registrazione del nome presso la RA Vedremo, nei successivi articoli quali sono i pre-requisiti tecnici per ottenere la registrazione del proprio nome di dominio.</span></p>
<p><span style="font-size: 12pt; font-family: 'Times New Roman'"><strong><em><span style="font-size: 16pt" lang="EN-US">Concludendo&#8230;</span></em></strong><span lang="EN-US"> </span></span><span style="font-size: 12pt; font-family: 'Times New Roman'"><span lang="EN-US"></span></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></p>
<p style="margin: 0cm 0cm 0pt; text-align: justify" class="Default"><span lang="EN-US">L&#8217;amministrazione del DNS non è cosa semplice, a volte può risultare piuttosto insidiosa. Tuttavia, dopo aver compreso i concetti che stanno alla base del suo funzionamento, non si dovrebbero avere grosse difficoltà a soddisfare anche esigenze di una certa portata.</span></p>
<p><span lang="EN-US"></span></p>
<p style="margin: 0cm 0cm 0pt" class="Default"><span lang="EN-US">Naturalmente, una trattazione su uno dei servizi più “anziani” di Internet non può certamente esaurirsi in queste righe, che tuttavia possono essere il punto di partenza per un&#8217;analisi più approfondita dell&#8217;argomento (vedi alla fine del tutorial).</span></p>
<p><span lang="EN-US"></span><span lang="EN-US"><span style="font-size: 12pt; font-family: 'Times New Roman'">Nel corso dei successivi articoli, vedremo insieme come implementare il servizio di DNS con GNU/Linux, esaminando gli aspetti della configurazione di un name server di cache, primario e secondario, attraverso l&#8217;impiego del pacchetto BIND ed affrontando problematiche specifiche come, ad esempio, la sicurezza.</span></span></p>
<p><span lang="EN-US"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></span><span lang="EN-US"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></span><span lang="EN-US"><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></span><span lang="EN-US"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"><span>Per ulteriori approfondimenti sugli argomenti trattati in queste pagine, consigliamo la lettura delle principali RFCs (Requests For Comment):</span><span> </span></span><span style="font-size: 12pt; font-family: 'Times New Roman'"><span></span></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span></span></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"> </span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></span><span style="font-size: 12pt; font-family: 'Times New Roman'"></p>
<p style="margin: 0cm 0cm 0pt 39pt; text-indent: -18pt; text-align: justify; tab-stops: list 39.0pt" class="Default"><span style="font-family: Symbol" lang="EN-US"><span>·<span style="font: 7pt 'Times New Roman'">        </span></span></span><span lang="EN-US">819 “The Domain Convention for Internet User Applications”</span></p>
<p style="margin: 0cm 0cm 0pt 39pt; text-indent: -18pt; text-align: justify; tab-stops: list 39.0pt" class="Default"><span style="font-family: Symbol" lang="EN-US"><span>·<span style="font: 7pt 'Times New Roman'">        </span></span></span><span lang="EN-US">1034 “Domain Names &#8212; Concepts and Facilities”</span></p>
<p style="margin: 0cm 0cm 0pt 39pt; text-indent: -18pt; text-align: justify; tab-stops: list 39.0pt" class="Default"><span style="font-family: Symbol" lang="EN-US"><span>·<span style="font: 7pt 'Times New Roman'">        </span></span></span><span lang="EN-US">1035 “Domain Names &#8212; Implementation and Specification”</span></p>
<p style="margin: 0cm 0cm 0pt 39pt; text-indent: -18pt; text-align: justify; tab-stops: list 39.0pt" class="Default"><span style="font-family: Symbol" lang="EN-US"><span>·<span style="font: 7pt 'Times New Roman'">        </span></span></span><span lang="EN-US">1591 “Domain Name System Structure and Delegation”</span></p>
<p><span lang="EN-US"></span><span lang="EN-US"><span>Inoltre, di seguito segnaliamo alcuni links di interesse:</span></span></p>
<p><span lang="EN-US"><span></span><span> </span></span><span lang="EN-US"><span style="font-family: Symbol"><span>·<span style="font: 7pt 'Times New Roman'">        </span></span></span><span><span> </span></span><span lang="EN-US"><a href="http://www.dns.net/dnsrd/"><span class="InternetLink"><font color="#000080">http://www.dns.net/dnsrd/</font></span></a></span></span></p>
<p><span lang="EN-US"><span lang="EN-US"></span><span></span><span style="font-family: Symbol"><span>·<span style="font: 7pt 'Times New Roman'">        </span></span></span><span><span> </span></span><span lang="EN-US"><a href="http://www.noc.garr.it/docum/corsi/CorsoDNS.pdf"><span class="InternetLink"><font color="#000080">http://www.noc.garr.it/docum/corsi/CorsoDNS.pdf</font></span></a></span><span></span><span> </span></span></p>
<p><span lang="EN-US"><span></span><span><span>Per chi, invece, desiderasse dedicarsi alla lettura di un buon libro, affrontando anche altre tematiche riguardanti le reti, consigliamo:</span></span></span></p>
<p><span lang="EN-US"><span><span> <span style="font-family: Symbol" lang="EN-US"><span>·<span style="font: 7pt 'Times New Roman'">        </span></span></span><span lang="EN-US">“Internetworking con TCP/IP” vol.1 – Douglas Comer – Ed. Addison-Wesley &#8211; 2002</span></span></span></span><span lang="EN-US"><span><span></span></span></span><span lang="EN-US"><span><span></span></span></span><span lang="EN-US"><span><span></span></span></span><span lang="EN-US"><span><span></span></span></span><span lang="EN-US"><span><span></span></span></span><span lang="EN-US"><span><span></span></span></span><span lang="EN-US"><span><span></p>
<p style="margin: 0cm 0cm 0pt 39pt; text-indent: -18pt; text-align: justify; tab-stops: list 39.0pt" class="Default"><span lang="EN-US"></span></p>
<p><span lang="EN-US"><span><span><strong>Questo articolo è stato realizzato insieme ad un mio grandissimo amico nonché appassionato di software Open-Sources e di Linux in particolare, che ora vedo un pò meno, perché si è maritato e vive lontanuccio, ma che vorrei salutare e ringraziare in queste pagine.</strong></span></span></span></p>
<p><span lang="EN-US"><span><span><strong>Grazie, Claudio!</strong></span></span></span></p>
<p><span lang="EN-US"><span><span></span></span></span></p>
<p></span></span></span></span></p>
<p style="margin: 0cm 0cm 0pt 39pt; text-indent: -18pt; text-align: justify; tab-stops: list 39.0pt" class="Default"><span lang="EN-US"></span></p>
<p></font></span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.space4tutorial.com/2007/07/31/il-dns-domain-name-system-guida-teorica/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
