\section{Network Manager}
\begin{frame}
   {Network Manager}

   \begin{itemize}
      \item
      Network interfaces used to be mostly static, both in
      hardware and software
      \item
      Modern systems often have dynamic configurations:
      \begin{itemize}
         \item Networks may change as a device is moved from
         place to place
         \item Wireless devices may have a large choice of
         networks to hook into
         \item Devices may change as hardware such as
         wireless devices, are plugged in or turned on and
         off
      \end{itemize}
      \item
      Previous discussed configuration files were created to
      deal with more static situations and are very
      distribution dependent.
      \item
      \textbf{Network Manager} should be almost the same on
      different systems
   \end{itemize}

\end{frame}

\cprotect\note{

   Once upon a time, network connections were almost all
   wired (Ethernet) and did not change unless there was a
   significant change to the system.

   As a system was booted, it consulted the network
   configuration files in the \filelink{/etc} directory
   subtree in order to establish the interface properties
   such as static or dynamic (DCHP) address configuration,
   whether the device should be started at boot etc.

   If there were multiple network devices, policies had to
   be established as to what order they would be brought up,
   which networks they would connect to, what they would be
   called etc.

   As wireless connections became more common (as well as
   hotplug network devices such as on \textbf{USB}
   adapters), configuration became much more complicated,
   both because of the transient nature of the hardware and
   that of the specific networks being connected to.

   A step away from distribution dependent interfaces and
   configuration files was a big advance.

   While \textbf{Network Manager} still uses configuration
   files, it is usually best to rely on its various
   utilities for manipulating and updating them.

}
\begin{frame}
   {Network Manager Interfaces}

   \begin{itemize}
      \item \textbf{GUI}

      Every \textbf{Linux} desktop (\textbf{GNOME},
      \textbf{KDE}, \textbf{XFCE}, etc) has one, usually
      reached by clicking on something in the horizontal
      panel.

      \item \textbf{nmtui}

      \textbf{n}etwork \textbf{m}anager \textbf{t}ext
      \textbf{u}ser \textbf{i}nterface is a rather simple
      navigable command line interface using the
      \textbf{ncurses} library interface

      \item \textbf{nmcli}

      \textbf{n}etwork \textbf{m}anager \textbf{c}ommand
      \textbf{l}ine \textbf{i}nterface is a lower level
      method which the higher level interfaces can use.  It
      is useful for scripts

   \end{itemize}

\end{frame}

\cprotect\note{

   If you are using your laptop in a hotel room or a coffee
   shop you are probably going to use whatever graphical
   interface your \textbf{Linux} distribution's desktop
   offers.  You can use this to select between different
   networks, configure security and passwords, turn devices
   off and on etc.

   If you are making a configuration change on your system
   that is likely to last for a while you are likely to use
   \textbf{nmtui} as it has almost no learning curve and
   will edit the underlying configuration files for you.

   If you need to run scripts that change the network
   configuration, you will want to use \textbf{nmcli}.  Or,
   if you are a command line junkie, you may want to use
   this instead of \textbf{nmtui}.

   If the \textbf{GUI} is properly done you should be able
   to accomplish any task using any of these three methods.
   However, we will focus on \textbf{nmtui} and
   \textbf{nmcli} because they are distribution independent
   and hide any differences in underlying configuration
   files.


}
\begin{frame}
   {nmtui}
   \begin{multicols}{2}
      \begin{figure}[H]
         \includegraphics[width=2.4in]{IMAGES/nmtui-main}
         \caption{\textbf{nmtui} Main Screen}
      \end{figure}

      \begin{figure}[H]
         \includegraphics[width=3.3in]{IMAGES/nmtui-edit}
         \caption{\textbf{nmtui} Edit Screen}
      \end{figure}
   \end{multicols}
\end{frame}

\cprotect\note{

   \textbf{nmtui} is rather straightforward to use.  You can
   navigate with either the arrow keys or the tab key.

   Besides activating or editing connections, you also set
   the system hostname.  However, some operations, such as
   this, can not be done by normal users and you will be
   prompted for the root password to go forward.

}

\begin{frame}
   {nmtui Wireless Configuration}
   \begin{figure}[H]
      \includegraphics[height=3.2in]{IMAGES/nmtui-config}
      \caption{\textbf{nmtui} Wireless Configuration}
   \end{figure}

\end{frame}

\cprotect\note{

}

\begin{frame}
   {nmcli}
   \begin{itemize}
      \item
      Command line interface to \textbf{Network Manager}
      \item
      Also has interactive mode
      \item
      See
      \url{https://fedoraproject.org/wiki/Networking/CLI}
      \item
      Also \verb?man nmcli-examples?
      \item
      Will try some examples in an exercise

   \end{itemize}
\end{frame}

\cprotect\note{

   \begin{figure}[H]
      \includegraphics[width=5.25in]{IMAGES/nmcli}
      \caption{nmcli}
   \end{figure}

}
