% vim: spell spelllang=en

\documentclass[11pt,xcolor={usenames,dvipsnames},aspectratio=169]{beamer}
\usetheme{metropolis}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}

\usepackage{texlib/my_listings}
\usepackage{texlib/todo}

\usepackage{booktabs}
\usepackage[thicklines]{cancel}

\renewcommand{\CancelColor}{\color{red}}

%\usepackage{inconsolata}


\lstdefinelanguage{iproute} {
    morekeywords={inet6},
    sensitive=true,
}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{Announcing IPv4 routes with an IPv6 next-hop in the Babel
routing protocol}
\subtitle{\textit{aka.}
    \href{https://datatracker.ietf.org/doc/draft-bastian-babel-v4ov6/}{
draft-bastian-babel-v4ov6}}
\author[\slidecountline]
{Théophile Bastian, joint work with Juliusz Chroboczek}
\date{}
%\subject{}
%\logo{}
\institute{
    \href{https://ens.fr/}{ENS Paris},
    \href{https://www.irif.fr/}{IRIF},
    \href{https://www.nexedi.com/}{Nexedi}}

\begin{document}

\maketitle{}

\begin{frame}{Traditional routing}
    \begin{table}
        \centering
        \textbf{IPv4 routing table} \\
        \medskip
        \begin{tabular}{@{} lcl @{}}
            \toprule
            Network Prefix (IPvX) & $\rightarrow$ & Next-Hop (IPvX)\\
            \midrule
            default & & 10.42.0.254 \\
            10.102.0.0/16 & & 10.102.0.1 \\
            10.102.0.0/24 & & 10.102.0.2 \\
            10.0.0.0/8 & & \xcancel{fd80:1::1} \\
            \bottomrule
        \end{tabular}
    \end{table}

    \vspace{1em}

    \begin{itemize}
        \item \textbf{Control plan:} \alert{babel}, routing protocol.
            \alert{Fills the routing table}.
        \item \textbf{Data plan:} correctly forward incoming packets.
            \alert{Uses the routing table}.
    \end{itemize}
\end{frame}

\begin{frame}{The router's job}
    \begin{figure}
        \centering
        \includegraphics[width=\columnwidth]{imgs/pdf/routing.pdf}
    \end{figure}
\end{frame}

\begin{frame}{What's under the hood?}
    \begin{figure}
        \centering
        \only<1>{\includegraphics[width=\columnwidth]{imgs/_autogen/mac/01.pdf}}
        \only<2>{\includegraphics[width=\columnwidth]{imgs/_autogen/mac/02.pdf}}
        \only<3>{\includegraphics[width=\columnwidth]{imgs/_autogen/mac/03.pdf}}
        \only<4>{\includegraphics[width=\columnwidth]{imgs/_autogen/mac/04.pdf}}
        \only<5>{\includegraphics[width=\columnwidth]{imgs/_autogen/mac/05.pdf}}
        \only<6>{\includegraphics[width=\columnwidth]{imgs/_autogen/mac/06.pdf}}
        \only<7>{\includegraphics[width=\columnwidth]{imgs/_autogen/mac/07.pdf}}
        \only<8>{\includegraphics[width=\columnwidth]{imgs/_autogen/mac/08.pdf}}
        \only<9>{\includegraphics[width=\columnwidth]{imgs/_autogen/mac/09.pdf}}
        \only<10>{\includegraphics[width=\columnwidth]{imgs/_autogen/mac/10.pdf}}
        \only<11>{\includegraphics[width=\columnwidth]{imgs/_autogen/mac/11.pdf}}
    \end{figure}
\end{frame}

\begin{frame}{The idea behind}
    \textbf{New type of route!} v4 prefix with v6 next-hop: \alert{v4-over-v6
    route}.

    \vspace{2em}

    \begin{itemize}
        \item Supporting both v4 and v6 is cumbersome: twice the configuration
        \item v6-only core, still serve v4 to clients
        \item IPv6 has \alert{link-local} and \alert{automatic addresses}
            (SLAAC)
            \begin{itemize}
                \item no need for DHCP or IP addresses configuration \emph{at all}!
            \end{itemize}
    \end{itemize}

    \vspace{2em}

    \textbf{Not an original idea!} BGP had it first:
    \href{https://datatracker.ietf.org/doc/draft-ietf-bess-rfc5549revision/}{draft-ietf-bess-rfc5549revision}
\end{frame}

\begin{frame}[fragile]{Linux support}
    \textbf{Supported in Linux} since 5.2 --~July 2019!

    \begin{minipage}[c]{0.1\textwidth}
        \includegraphics[height=1.2em]{imgs/Git-Logo-1788C}
    \end{minipage}
    \begin{minipage}[c]{0.85\textwidth}
            \begin{block}{d1566268 -- 2019-04-05 -- ipv4: Allow ipv6 gateway with ipv4 routes}
                \quad{}Add support for \lstbash{RTA_VIA} and allow an IPv6 nexthop for v4
                routes.
            \end{block}
    \end{minipage}

    \vspace{2em}

    \begin{itemize}
        \item{} Usually, add a v4 route with
            \begin{lstlisting}[language=iproute, numbers=none]
# ip route add 10.42.0.0/16 via 10.40.0.42 dev eno1
            \end{lstlisting}

        \item{} v4-over-v6 (recent kernel):
            \begin{lstlisting}[language=iproute, numbers=none]
# ip route add 10.42.0.0/16 via inet6 fe80::a0de:baf:b39b dev eno1
            \end{lstlisting}
    \end{itemize}

\end{frame}

\section{Babel protocol extension}

\begin{frame}{Advertising v4-over-v6 routes}
    \textbf{An IPv4 interface} never announces v4-over-v6 routes

    \vspace{1em}

    \textbf{A v6-only interface}
    \begin{itemize}
        \item{} \alert{Installs a v4 route} nevertheless when receiving it
        \item{} \alert{Announces a v4-over-v6 route} for each v4 route
    \end{itemize}
\end{frame}

\begin{frame}{Backwards compatibility}
    \textbf{An unextended node must}

    \begin{itemize}
        \item Be able to \alert{ignore v4-over-v6 routes}
        \item \alert{Route correctly} pure v4 and v6
    \end{itemize}

    \todo{Choices considered}
\end{frame}

\begin{frame}{Introducing a new AE}
    In Babel, \alert{Address Encodings} (AEs) define the type of address/prefix
    contained in a TLV.
    \begin{itemize}
        \item IPv4 address
        \item IPv6 address
        \item link-local IPv6 address
        \item[$\bigstar$] \alert{v4-over-v6 address}
    \end{itemize}

    \vspace{1em}

    \alert{Enough} to express v4-over-v6 routes: \alert{no new TLVs}
    introduced.
\end{frame}

%%%%%%%%%%% Conclusion frame %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}{}
    \begin{center}
        \alert{\Huge Questions?}
    \end{center}

    \vspace{3em}

    \begin{columns}[T]
        \begin{column}{0.5\textwidth}
            \centering
            \textbf{\large RFC draft}

            \href{https://datatracker.ietf.org/doc/draft-bastian-babel-v4ov6/}{\texttt{\large huit.re/draft-v4ov6}}

            \includegraphics[width=0.4\textwidth]{imgs/pdf/qr_draft.pdf}
        \end{column}

        \begin{column}{0.5\textwidth}
            \centering
            \textbf{\large These slides}

            \href{https://tobast.fr/files/ietf108-v40v6.pdf}{\texttt{\large huit.re/ietf108-v4ov6}}

            \includegraphics[width=0.4\textwidth]{imgs/pdf/qr_slide.pdf}
        \end{column}
    \end{columns}
\end{frame}

\end{document}
