\begin{exe} {Adding a Static Hostname}

   In this exercise we will add entries to the local host
   database.
   \begin{enumerate}
      \item

      Open \filelink{/etc/hosts} and add an entry for
      \texttt{mysystem.mydomain} that will point to the IP
      address associated with your network card.
      \item

      Add a second entry that will make all references to
      \texttt{ad.doubleclick.net} point to
      \texttt{127.0.0.1}.

      \item

      As an optional exercise, download the host file
      from: \url{http://winhelp2002.mvps.org/hosts2.htm}
      or more directly from
      \url{http://winhelp2002.mvps.org/hosts.txt}, and
      install it on your system. Do you notice any
      difference using your browser with and without the
      new host file in place?
   \end{enumerate}
   \begin{sol}

      \begin{enumerate}
         \item
         \begin{cmd}
$ sudo sh -c "echo 192.168.1.180    mysystem.mydomain >> /etc/hosts"
$ ping mysystem.mydomain
         \end{cmd}
         \item
         \begin{cmd}
$ sudo sh -c "echo 127.0.0.1       ad.doubleclick.net >> /etc/hosts"
$ ping ad.doubleclick.net
         \end{cmd}
         \item
         \begin{cmd}
$ wget http://winhelp2002.mvps.org/hosts.txt
         \end{cmd}
         \begin{response}
--2014-11-01 08:57:12--  http://winhelp2002.mvps.org/hosts.txt
Resolving winhelp2002.mvps.org (winhelp2002.mvps.org)... 216.155.126.40
Connecting to winhelp2002.mvps.org (winhelp2002.mvps.org)|216.155.126.40|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 514744 (503K) [text/plain]
Saving to: hosts.txt

100%[======================================>] 514,744      977KB/s   in 0.5s

2014-11-01 08:57:13 (977 KB/s) - hosts.txt saved [514744/514744]
         \end{response}
         \begin{cmd}
$ sudo sh -c "cat hosts.txt >> /etc/hosts"
         \end{cmd}
      \end{enumerate}
   \end{sol}
\end{exe}

