\documentclass[12pt,a4paper]{article}
\usepackage[spanish]{babel}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{tikz}
\usetikzlibrary{shapes,positioning,calc}

\title{Tema V Ejercicio II: DNS}
\author{Nicolás A. Ortega Froysa}

\begin{document}
\maketitle
\pagebreak
\tableofcontents
\pagebreak
\section{Hoja De Control Del Documento}
\begin{table}[h!]
	\centering
	\caption{Documento/Archivo}
	\label{tab:document}
	\begin{tabular}{|l|c|l|c|}
		\hline
		{\bf Fecha Última Modificación} & \the\day/\the\month/\the\year &
		{\bf Versión/Revisión} & v01r01 \\ \hline
		{\bf Fecha Creación} & \the\day/\the\month/\the\year & \hfill & \hfill \\ \hline
		{\bf Fecha Finalización} & \the\day/\the\month/\the\year & \hfill &
		\hfill \\ \hline
	\end{tabular}
\end{table}

\begin{table}[h!]
	\centering
	\caption{Registro De Cambios}
	\label{tab:registro-cambios}
	\begin{tabular}{|c|c|c|}
		\hline
		{\bf Versión/Revisión} & {\bf Página(s)} & {\bf Descripción} \\
		\hline
		v01r01 & Todas & Creación y elaboración del documento. \\ \hline
	\end{tabular}
\end{table}

\begin{table}[h!]
	\centering
	\caption{Autores Del Documento}
	\label{tab:autores}
	\begin{tabular}{|c|c|}
		\hline
		{\bf Apellidos, Nombre} & {\bf Curso} \\ \hline
		Ortega Froysa, Nicolás Andrés & 1 \\ \hline
	\end{tabular}
\end{table}

\begin{table}[h!]
	\centering
	\begin{tabular}{|p{4cm}|p{4cm}|p{4cm}|}
		\hline
		{\bf Preparado} & {\bf Revisado} & {\bf Aprobado} \\ \hline
		Ortega Froysa, Nicolás Andrés & \hfill & \hfill \\ \hline
	\end{tabular}
\end{table}

\pagebreak

\section{Jerarquía del Espacio de Nombres}
\begin{table}[h!]
	\centering
	\begin{tabular}{|c|c|c|}
		\hline
		{\bf Nombre Dominio} & {\bf Protocolo} & {\bf Dirección IP} \\ \hline
		tftp1.docsis.finantial.com. & TFTP & 172.26.1.10 \\ \hline
		dns\_doc.docsis.finantial.com. & DNS & 172.26.1.11 \\ \hline
		pppserver.docsis2.finantial.com. & SSH & 172.26.3.7 \\ \hline
		dns\_doc2.finantial.com. & DNS & 172.26.3.8 \\ \hline
		ftp\_arch.ojm.com. & FTP & 172.32.10.2 \\ \hline
		dns1.ojm.com. & DNS & 172.32.10.3 \\ \hline
		www.ojm.com. & HTTP & 172.32.12.4 \\ \hline
		coco.labcom.com. & STREAMING & 10.0.12.3 \\ \hline
		dns\_cocolab.labcom.com. & DNS & 10.0.12.4 \\ \hline
		www.cv-cep.ceuandalucia.es. & HTTP & 192.168.12.100 \\ \hline
		wjade.cv-cep.ceuandalucia.es. & HTTP & 192.168.12.53 \\ \hline
		dns\_info.cv-cep.ceuandalucia.es. & DNS & 192.168.12.40 \\ \hline
		mailservery.europa.es. & MAIL & 10.0.10.100 \\ \hline
		dns\_eur.europa.es. & DNS & 10.0.10.120 \\ \hline
	\end{tabular}
	\caption{Espacio de nombres.}
\end{table}

\begin{figure}
	\begin{tikzpicture}[sibling distance=5em,
		level distance=7em,
		rotate=90,
		every node/.style={draw,align=center},
		root/.style={fill=green!20},
		tld/.style={fill=blue!20},
		branch/.style={shape=ellipse},
		leaf/.style={shape=rectangle,fill=yellow!20},
		level 1/.append style={sibling distance=8em},
		level 2/.append style={sibling distance=6em},
		level 3/.append style={sibling distance=3em}]
		\node[branch,root] {•}
			child { node[branch,tld] {com}
				child { node[branch] {finantial}
					child { node[branch] {docsis}
						child { node[leaf] {tftp1} }
					}
					child { node[branch] {docsis2}
						child { node[leaf] {pppserver} }
					}
				}
				child { node[branch] {ojm}
					child { node[leaf] {ftp\_arch} }
					child { node[leaf] {www} }
				}
				child[sibling distance=4em] { node[branch] {labcom}
					child { node[leaf] {coco} }
				}
			}
			child { node[branch,tld] {es}
				child[sibling distance=3em] { node[branch] {ceuandalucia}
					child { node[branch] {cv-cep}
						child { node[leaf] {wjade} }
						child { node[leaf] {www} }
					}
				}
				child[sibling distance=3em] { node[branch] {europa}
					child { node[leaf] {mailservery} }
				}
			};
	\end{tikzpicture}
	\caption{Árbol del espacio de nombres.}
	\label{fig:tree}
\end{figure}

\begin{figure}[h!]
	\begin{tikzpicture}[sibling distance=5em,
		every node/.style={draw,align=center},
		root/.style={fill=green!20},
		tld/.style={fill=blue!20},
		branch/.style={shape=ellipse},
		leaf/.style={shape=rectangle,fill=yellow!20},
		label/.style={draw=none,fill=none}]
		\matrix[row sep=1em,column sep=0.5em] {
			\node[label] {Zona I}; &
			\node[label] {Zona II}; &
			\node[label] {Zona III}; \\
			\node[tld,branch] {com}
				child { node[branch] {finantial} }
				child { node[branch] {ojm} }
				child { node[branch] {labcom} }; &
			\node[branch] {finantial}
				child { node[branch] {docsis} }
				child { node[branch] {docsis2} }; &
			\node[branch] {ojm}
				child { node[leaf] {ftp\_arch} }
				child { node[leaf] {www} }; \\
			\node[label] {Zona IV}; &
			\node[label] {Zona V}; &
			\node[label] {Zona VI}; \\
			\node[branch] {labcom}
				child { node [leaf] {coco} }; &
			\node[branch] {docsis}
				child { node[leaf] {tftp1} }; &
			\node[branch] {docsis2}
				child { node[leaf] {pppserver} }; \\
		};
	\end{tikzpicture}
	\caption{Zonas DNS de {\tt .com}.}
	\label{fig:zones}
\end{figure}

\pagebreak

\section{Derechos de Autor y Licencia}
Copyright \copyright\ \the\year\ Nicolás A. Ortega Froysa <nicolas@ortegas.org>
\\
Este documento se distribuye bajo los términos y condiciones de la licencia
Creative Commons Attribution No Derivatives 4.0 International.

\end{document}
